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!

How to Convert a Date to a Specific Text Format-Deadline Near

Status
Not open for further replies.

TSimonick

Technical User
Sep 6, 2001
39
US
Hi,

I'm converting a tables and need to change dates to plain text strings:

6/4/2002 to 060402
11/9/2000 to 110900

Anyone can help on the code I'd appreciate it!!

Thanks,

Tom
 
Sorry, need to clarify (tired mind). When I use DatePart I'm getting a space that I can't figure out a way to remove. For example "0"&(str$(DatePart("m", "9/02/04"))) produces 0 9. There is always a space preceeding the value of DatePart.

Any ideas?

Thanks,

Tom
 
Format(Month(YourDate),"00") & Format(Day(YourDate),"00") & Right(Year(YourDate),2)

should return what you want (in mmddyy format)...

Good luck
[pipe]
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
 
Thanks Daniel, that will work fine!

Regards,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top