|
Posted by Pedro Graca on 09/27/22 11:37
John K wrote:
> I need to format the date going "into" the database.
mysql> create table foo (id int primary key auto_increment, t1 datetime, t2 timestamp);
Query OK, 0 rows affected (0.03 sec)
mysql> insert foo (t1, t2) values (20060117201703, 20060117201703);
Query OK, 1 row affected (0.05 sec)
mysql> select * from foo;
+----+---------------------+---------------------+
| id | t1 | t2 |
+----+---------------------+---------------------+
| 1 | 2006-01-17 20:17:03 | 2006-01-17 20:17:03 |
+----+---------------------+---------------------+
1 row in set (0.00 sec)
--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Navigation:
[Reply to this message]
|