Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Dates

Status
Not open for further replies.

DirtyB

Programmer
Mar 13, 2001
159
US
I have dates here stored as mm/dd/yyyy. I will be exporting them into a fixed width file. I put a format on the table to change them to mmddyyyy. When I open the table the dates appear just as I need them for exporting, with no slashes. When I query this table, the query results show up again with the slashes in the dates. I tried changing this field to text, and it also puts the slashes back into the string. Does anyone know how I can convert this data from the mm/dd/yyyy format to mmddyyyy? Also, if anyone knows, what is the point of this functionality? It doesn't make sense to me.

Thanks
 
When you say you'll be exporting to a fixed-width file, do you mean a text file? If so, in the export specification you can specify the format you want for a date and the delimiter to use. I've done it and used the following settings:
Date Order: MDY
Date Delimiter: (leave blank)
4-digit year: Checked
Leading zeroes in Dates: Checked

Inside my Access tables, the dates display with slashes, but they export quite nicely without.

Bev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top