I've been beating my head against this one for a while now, and I'm sure I'm not the first person on the planet with this issue.
I'm using a query to create a table. I then perform some VBA manipulation before outputting the modified table to an excel spreadsheet. The issue I have is that one field needs to be a date datatype so I can compare to other dates, but the spreadsheet needs this field in the format dd.mm.yyyy as it is then input into another program.
If I use 'format' in the query, the field gets changed into a text field, so my comparisons don't work, or I end up with the output dates in the wrong format.
Can I somehow do this all within the query, or can I change either the formatting or the datatype of the field after the fact, just before I output to excel?
I'm using a query to create a table. I then perform some VBA manipulation before outputting the modified table to an excel spreadsheet. The issue I have is that one field needs to be a date datatype so I can compare to other dates, but the spreadsheet needs this field in the format dd.mm.yyyy as it is then input into another program.
If I use 'format' in the query, the field gets changed into a text field, so my comparisons don't work, or I end up with the output dates in the wrong format.
Can I somehow do this all within the query, or can I change either the formatting or the datatype of the field after the fact, just before I output to excel?