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

SQL Date Format

chandru8
100+
P: 145
hi to all
i am using vb6.0 and msaccess 2003

iam inserting date like the query mentioned below
strSql = "Insert into table1 values (#" & Date & "# )"

the problem is ..,

for the 1ST date if april it inserted like 04/01/2008

so i changed the properties in the msaccess table .After that also its saving like that only i thought the msaccess took the date format as mm/dd/yyyy

but after 10 th date of april

its inserting like 10/04/2008

i dont know what to do

can any one help in this .


its urgent

thanks in advance
Apr 14 '08 #1
Share this Question
Share on Google+
3 Replies


100+
P: 142
hi to all
i am using vb6.0 and msaccess 2003

iam inserting date like the query mentioned below
strSql = "Insert into table1 values (#" & Date & "# )"

the problem is ..,

for the 1ST date if april it inserted like 04/01/2008

so i changed the properties in the msaccess table .After that also its saving like that only i thought the msaccess took the date format as mm/dd/yyyy

but after 10 th date of april

its inserting like 10/04/2008

i dont know what to do

can any one help in this .


its urgent

thanks in advance
Hi,

Database always allows us to eneter date in the US format[MM/DD/YYYY]. Don't use indian datetime format.

Cheers,
Balaji U
Apr 14 '08 #2

NeoPa
Expert Mod 15k+
P: 31,186
Please remember to provide a meaningful Title for any threads started (Please Use Appropriate Titles for New Threads!). This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions.

ADMIN.
Apr 15 '08 #3

NeoPa
Expert Mod 15k+
P: 31,186
See Literal DateTimes and Their Delimiters (#) for why your current code is not working. It is all explained in there.

If you still have difficulty after reading that post back in here and we can try to explain further.
Apr 15 '08 #4

Post your reply

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