date insert into mysql
am 18.02.2007 01:25:10 von Kiran Annaiah
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
____________________________________________________________ _____
Refi Now: Rates near 39yr lows! $430,000 Mortgage for $1,399/mo - Calculate
new payment
http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632- 17727&moid=7581
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
Re: date insert into mysql
am 18.02.2007 02:01:10 von Daniel Kasak
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?
That's right.
--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
Re: date insert into mysql
am 18.02.2007 02:30:19 von Marius Feraru
-----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-functio ns.html
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----
iD8DBQFF16wrtZHp/AYZiNkRAmRoAKDWtdFFW2ejIa6HDeUj7AwKhto8ywCf YmDU
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/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org