Back to the month index |
Back to the list index
|
rasmus@madhaus.utcs.utoronto.ca
Sun, 1 Sep 1996 05:56:08 -0400 (EDT)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Anderson, Hans: "[mSQL] Chat Rooms"
- Previous message: Stefano Corsi: "[mSQL] Msql and DATE fields..."
- Next in thread: Gary Bickford: "Re: [mSQL] Msql and DATE fields..."
From: rasmus@madhaus.utcs.utoronto.ca Date: Sun, 1 Sep 1996 05:56:08 -0400 (EDT) Subject: Re: [mSQL] Msql and DATE fields... Message-Id: <ML-2.3.841571768.3978.rasmus@krone.house.mil>> In the project i'm developing i should use some DATE fields in a MSQL
> table. I use MSQL 1.4 and PHP/FI. Does anyone have a good solution for it?
> Is it better to store the DATE as integer or as text?
If your dates all fall between 1902 and 2038, then I would suggest you use
the Unix time format. This is an integer which represents the number of
seconds since Unix epoch Jan.1 1970 (negative values bring you back to
1902). PHP/FI has support for manipulating these integers. Look at the
time(), Date() and MkTime() functions.
-Rasmus
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Anderson, Hans: "[mSQL] Chat Rooms"
- Previous message: Stefano Corsi: "[mSQL] Msql and DATE fields..."
- Next in thread: Gary Bickford: "Re: [mSQL] Msql and DATE fields..."