Joe4
MrExcel MVP, Junior Admin
- Joined
- Aug 1, 2002
- Messages
- 72,265
- Office Version
- 365
- Platform
- Windows
I have a query which I am exporting to a CSV file. I have some date fields. In the Query Designer, under Properties of these fields, I set their format to a custom format of mm/dd/yyyy so that when viewing the query, today's date would show up like: 09/28/2006
However, if I export the file to a CSV file, in the file the date appears like:
9/22/2006 0:00:00
Is there a way to get it to export in the same format I have it displayed in (i.e. 09/28/2006)?
I know I can use the FORMAT function and use "mm/dd/yyyy" as my format, but the potential problem with that is that converts it to a Text format, which means if have a Text Qualifier set, it surrounds this value with the Text Qualifier, even though it is supposed to be a Date field and not a Text field (so my value exports as "09/28/2006" instead of the desired 09/28/2006).
Thanks.
However, if I export the file to a CSV file, in the file the date appears like:
9/22/2006 0:00:00
Is there a way to get it to export in the same format I have it displayed in (i.e. 09/28/2006)?
I know I can use the FORMAT function and use "mm/dd/yyyy" as my format, but the potential problem with that is that converts it to a Text format, which means if have a Text Qualifier set, it surrounds this value with the Text Qualifier, even though it is supposed to be a Date field and not a Text field (so my value exports as "09/28/2006" instead of the desired 09/28/2006).
Thanks.