Re: date insert into mysql

Marius Feraru <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Organization N0i.Net
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kiran Annaiah wrote:
> I am having trouble inserting date into mysql from my perl DBI script.
> 
> my date format is in mon/day/yyyy format.
> 
> Should i split it and rearrange it to look like yyyy-mm-dd before 
> inserting?
> 
> i am using mysql 5.0

or use "STR_TO_DATE". e.g.: str_to_date('2/18/2007', '%m/%d/%Y')

RTFM: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----

iD8DBQFF16wrtZHp/AYZiNkRAmRoAKDWtdFFW2ejIa6HDeUj7AwKhto8ywCfYmDU
OwYg6U/ha5OlnZxqUP6gk/Q=
=Agpn
-----END PGP SIGNATURE-----

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.