Click here to get back home

Urgent : DateTime format in MySQL

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Urgent : DateTime format in MySQL bhv 09-11-2006
Get Chitika Premium
Posted by bhv on September 11, 2006, 12:12 am
Please log in for more thread options
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


Posted by strawberry on September 11, 2006, 3:42 am
Please log in for more thread options

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


Posted by bhv on September 13, 2006, 12:44 am
Please log in for more thread options
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


Similar ThreadsPosted
help to retieve only the difference in minutes between two dates in DATETIME format December 18, 2006, 8:31 am
MySQL CAST DateTime field AS TIME problem April 11, 2006, 5:48 pm
Excel -> MySQL ODBC data format problem February 9, 2006, 12:08 pm
Please Help - urgent request Pt II January 30, 2006, 12:37 pm
URGENT RESPOND March 20, 2007, 9:30 am
TREAT AS URGENT April 4, 2007, 7:31 am
URGENT FUND TRANSFER December 5, 2005, 11:21 am
Urgent Response Needed June 23, 2007, 8:40 am
Please help - urgent request - I need a query like below ASAP January 30, 2006, 11:29 am
REPOST : Urgent : Foreign key on the same table November 20, 2006, 4:01 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap