By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,822 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,822 IT Pros & Developers. It's quick & easy.

converting text string to date

7 of 9
P: 23
Ok here is the problem I have a field (Fdate) that contains dates as a string in the Century, Year, Month, Day format ex. 1070308 is March 8th 2007 . I need to convert this to MM/DD/YY format (03/08/07) how do i do this?
May 31 '07 #1
Share this Question
Share on Google+
3 Replies

Rabbit
Expert Mod 10K+
P: 12,441
Take a look at the CDate function. That coupled with the Mid function will get you what you need.
May 31 '07 #2

7 of 9
P: 23
Take a look at the CDate function. That coupled with the Mid function will get you what you need.
Thanks I use the following
Date: Mid([FMDATE],4,2) & "/" & Right([FMDATE],2) & "/" & Mid([FMDATE],2,2)
May 31 '07 #3

Rabbit
Expert Mod 10K+
P: 12,441
Thanks I use the following
Date: Mid([FMDATE],4,2) & "/" & Right([FMDATE],2) & "/" & Mid([FMDATE],2,2)
Very good, although you might want to use CDate as well to make it a date value. Right now it's probably considered a string. You also shouldn't name the field Date.
May 31 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.