469,133 Members | 1,022 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,133 developers. It's quick & easy.

Urgent : DateTime format in MySQL

bhv
hello everybody, i have datetime format in mysql database table. now,
in mysql date is YYYY-MM-DD format. how can i insert date in this
format with VB Script ? i had tried following

dim dt, dy, dm, dd, pd, tm
tm = Time
dt = Date
dy = DatePart("YYYY",dt)
dm = DatePart("M",dt)
dd = DatePart("D", dt)

pd = dy & "-" & dm & "-" & dd & " " tm

this shows correct datetime, but doesn't insert in database table. it
gives error: incorrect format.

this is my first project in MySQl. please help

thanks

Bhagvati

Sep 11 '06 #1
2 8754

bhv wrote:
hello everybody, i have datetime format in mysql database table. now,
in mysql date is YYYY-MM-DD format. how can i insert date in this
format with VB Script ? i had tried following

dim dt, dy, dm, dd, pd, tm
tm = Time
dt = Date
dy = DatePart("YYYY",dt)
dm = DatePart("M",dt)
dd = DatePart("D", dt)

pd = dy & "-" & dm & "-" & dd & " " tm

this shows correct datetime, but doesn't insert in database table. it
gives error: incorrect format.

this is my first project in MySQl. please help

thanks

Bhagvati
Writing "Urgent" in the subject really won't help your chances of a
speedy response!

Good luck

Sep 11 '06 #2
bhv
well, i have done it.

Bhagvati

strawberry wrote:
bhv wrote:
hello everybody, i have datetime format in mysql database table. now,
in mysql date is YYYY-MM-DD format. how can i insert date in this
format with VB Script ? i had tried following

dim dt, dy, dm, dd, pd, tm
tm = Time
dt = Date
dy = DatePart("YYYY",dt)
dm = DatePart("M",dt)
dd = DatePart("D", dt)

pd = dy & "-" & dm & "-" & dd & " " tm

this shows correct datetime, but doesn't insert in database table. it
gives error: incorrect format.

this is my first project in MySQl. please help

thanks

Bhagvati

Writing "Urgent" in the subject really won't help your chances of a
speedy response!

Good luck
Sep 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Tony Clarke | last post: by
5 posts views Thread by Vishal | last post: by
9 posts views Thread by Shapper | last post: by
6 posts views Thread by Brandon | last post: by
2 posts views Thread by electronik | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.