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

Please help me in Date format conversion

P: 6
Hi

I have typed following, to convert date from mm/dd/yyy to dd/mm/yyy. But it works only If backend is sql-server & not when it is Ms-Access.

rs7 = Server.CreateObject("ADODB.Recordset")

strsql7 = "select convert(char, empdob, 105) as empdob from empinfo where empid = "&empid& "and empdob='"&editobjRS("empdob")&"' ;"

rs7.Open strsql7, objConn

Please help me to convert date to dd/mm/yyy format after retriving date from MS-access table.

Thanks
Oct 10 '07 #1
Share this Question
Share on Google+
1 Reply


nico5038
Expert 2.5K+
P: 3,072
I wouldn't change the date "on forehand", but after retrieval when you have to display it.
Internally Access uses only the US-date format.
Best is not to use dd/mm/yyyy format, but dd/mmm/yyyy, thus showing the month as an abbreviation in the field and thus you won't have trouble when re-using such a field in an additional query.

Nic;o)
Oct 10 '07 #2

Post your reply

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