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

Access database conversion

P: 2
I have a vendor database that I need to Query using Access. Their date fields are formatted as follows. "1061025" in their D/B where 1=constant value in every date,06=year,10=month,25=day. Is there a way to convert this to a normal mm/dd/yy format with SQL? Thanks for any help and suggestions.
Oct 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: 6
I have a vendor database that I need to Query using Access. Their date fields are formatted as follows. "1061025" in their D/B where 1=constant value in every date,06=year,10=month,25=day. Is there a way to convert this to a normal mm/dd/yy format with SQL? Thanks for any help and suggestions.
I would just use the following:
Assuming sVar = "1061025" use the follwing

mid(sVar,4,2) & "/" & left(sVar,2) & "/" & mid(sVar,2,2)
=
10/25/06
however this would be a string,
but in sql must convert it to date, therefore use cdate(sVar)
Oct 25 '06 #2

Post your reply

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