Date format

  • Thread starter Thread starter Edgar Thoemmes
  • Start date Start date
E

Edgar Thoemmes

I am trying to save a file with the date as part of the
file name but the format is wrong. I guess I have to set
the date to a variable and then specify the format but I
dont know how to specify the format. Can anyone help?
 
I am trying to save a file with the date as part of the
file name but the format is wrong. I guess I have to set
the date to a variable and then specify the format but I
dont know how to specify the format. Can anyone help?


Look at the FORMAT function:


Format Function

Returns a Variant (String) containing an expression formatted according to
instructions contained in a format expression.

so something like:

fnstring = "My Filename"

fnstring = fnstring & FORMAT(DATE,"yyyymmdd")




--ron
 
Back
Top