RE: Storing mysql dates as an integer [SOLVED]

2004-01-08 Thread Dave G
Fred, An unsigned int is probably more appropriate for timestamps than a signed int. Thank you, that was the kind of advice I was looking for. And your point about not using UNIX time stamps for birthdays and things that could well be outside their date range is well taken. I'm only

Re: Storing mysql dates as an integer

2004-01-08 Thread Craig A. Finseth
An unsigned int is probably more appropriate for timestamps than a signed int. Also note that the range for timestamps is 1970 until 2038 (or 2106? for unsigned ints), where DATE and DATETIME have a much greater range. Using a UNIX timestamp for birthdays might not be appropriate.

Re: Storing mysql dates as an integer

2004-01-07 Thread Paul DuBois
At 9:57 +0900 1/8/04, Dave G wrote: MySQL Gurus, Because of time zone differences between my web site's intended audience (Japan) and my server's location (Nevada), I've found that it's most efficient, or at least most simple, to do all my time calculations in PHP. Up to now, I've

RE: Storing mysql dates as an integer

2004-01-07 Thread Dave G
Paul, (Unix timestamps are ten digits, aren't they?). No, they're fourteen digits: CCYYMMDDhhmmss I think we might be talking about different things. A UNIX time stamp is ten digits long: http://www.unixtimestamp.com/ How MySQL stores it's own TIMESTAMP column is the format you describe. I

RE: Storing mysql dates as an integer

2004-01-07 Thread Paul DuBois
At 11:25 +0900 1/8/04, Dave G wrote: Paul, (Unix timestamps are ten digits, aren't they?). No, they're fourteen digits: CCYYMMDDhhmmss I think we might be talking about different things. A UNIX time stamp is ten digits long: http://www.unixtimestamp.com/ How MySQL stores it's own TIMESTAMP