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

Date formats...

Status
Not open for further replies.

Phailak

Programmer
Apr 10, 2001
142
CA
Hail,

Here's my problem.
I'm retrieving a date from a text file that is in the following format:

MM/DD/YY

and need to make it into:

YYYY-MM-DD

I do the following:

Format("07/01/01", "yyyy-mm-dd") and get 2007-01-01

How can I correct this, is my format not correct?

Phailak
 
This revised format should work:
Format(#07/01/01#, "yyyy-mm-dd") should provide you with the data format you need.

Chuck

 
Hail,

Thanx, although I finally bypassed it by taking first 6 chrs, then adding "20" and then last 2 chrs. Works fine, your way would of saved me a detour though

Phailak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top