Urgent : DateTime format in MySQL
Urgent : DateTime format in MySQL
am 11.09.2006 06:12:15 von 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
Re: Urgent : DateTime format in MySQL
am 11.09.2006 09:42:22 von zac.carey
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
Re: Urgent : DateTime format in MySQL
am 13.09.2006 06:44:34 von 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