Date Formatting??

louchey

Member
Local time
Today, 22:31
Joined
Mar 24, 2003
Messages
38
Hi Guys,

I Have been using this function basically to export data to .xls and giving the last part of the file name as todays date. Been working fine, but I've noticed today that is not formatting the date to DD/MM/YYYY anymore??
Can anyone see anything I'm missing??

Thanks for any help

Louchey

Public Function exportFile()
Dim FileToExport As String

FileToExport = "S:\SHARED\Ben L\Pipe_Supports_" & Format(Date$, "dd-mm-yyyy")

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Pipe_Supports", FileToExport
End Function
 
sorry,

it is now formatting to MM/DD/YYYY

Louchey
 
Check the regional settings in Windows.

We have been having serious problems with access doing this to us, for some reason's date validations stop working because Windows seems to revert to the american date format.

so

format(Date$, "mm/dd/yyyy")

Would sort that for you, if this was the case.
 
Cheers Moonshine,

Did a bit of trial and error myself and realised the same thing.
Will look into my Windows setting.

Cheers

louchey
 

Users who are viewing this thread

Back
Top Bottom