Dates change when exporting

travismp

Registered User.
Local time
Today, 20:02
Joined
Oct 15, 2001
Messages
386
simple query that shows results with 5 columns, one of which is a date based field. I set up a macro which allows my user to click a button which creates an excel sheet. The dates do not stay correct when exported to excel. What is wrong here?
 
Set a format in the query itself - don't rely on what it is displaying in the query from the table.

So, if you want m/d/yy you would use something like this in the query:

MyDate:Format(MyDateFieldNameHere,"m/d/yy")

making sure that MyDate is not the same name as MyDateFieldNameHere.
 
BobLarson,

Thank you for the response. I have been out for about a week and a half. I have one followup question. The query type is Select type where I ask for totals. When I change the format as listed above and say return the MAX for that field the query changes from "Max" to "Expression" and then does this:

MyDate: Max(Format([TestDate],"m/d/yy"))

Will this still give the correct result set?
 

Users who are viewing this thread

Back
Top Bottom