Page 1 of 1
sintax in sql to insert date into database
Posted: Thu Jul 01, 2004 3:55 pm
by ddragas
What is sintax in sql to insert date into mysql database
I know in access is #month/day/year#
Posted: Thu Jul 01, 2004 4:06 pm
by scorphus
You can find this information on
Date and Time Types and
Date and Time Functions.
-- Scorphus
try this
Posted: Thu Jul 01, 2004 4:45 pm
by Calimero
insert into table1 values ('text1', 'text2', now());
now() will fill the current date or time or date/time and timestamp automatically

Posted: Thu Jul 01, 2004 5:43 pm
by PrObLeM
Posted: Thu Jul 01, 2004 5:46 pm
by markl999
Just to point out that time() returns a unix timestamp whereas mysql's now() returns the current date and time as a value in 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or numeric context.