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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format date field

Status
Not open for further replies.

gray78

Programmer
Feb 3, 2005
78
US
I have downloaded a log (.txt) file off a server and imported it into an access table. The format of the date/time field from the log is as follows:
[12/Oct/2005:13:26:04
and
- [12/Oct/2005:13:28:2

I want to convert it to a mm/dd/yyyy format. How can this be accomplished?

Thanks
 
Hi

Make a new field of type date/time, with format property "mm/dd/yyyy", in your table. Make an update query to update the new field with the content of the incomming text field. Use CDate() function to convert the text to a date type, and Mid() to extract the relevant bits of the text field.

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top