incrementing DATETIME

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 28
Joined: Tue Jan 21, 2003 9:31 pm

Tue Feb 11, 2003 5:40 am

why you using the dat type field format, just use a big int and store the time in the 10 figure number like 1045645444 and then modify it form there and convert it into ya date into any format you want, it seems much easier to me.
[flash width=300 height=100 loop=true][/flash]

Administrator Newbieslair

New php-forum User
New php-forum User
Posts: 80
Joined: Fri Jan 31, 2003 4:18 pm

Fri Feb 14, 2003 4:08 pm

make a timestamp-cell in mysql.....if you select the timestamp-field, read it like:

SELECT UNIX_TIMESTAMP(time) as epoch_time

then you can do anything you want with it :)

and that way you can do so much more nice and tricky mysql-features with that cell (like selecting a certain day range etc)

Post Reply