Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Date before 1970

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Date before 1970

Postby mpgalvin » Sun Jan 12, 2003 3:05 am

Apologies if this has been asked before: my search turned up nothing.

I have a database (it's Access, but I can move to mySQL, but I don't think it'll make a difference) with a date column, 'date'. In this column, there are standard date values, 29/06/1972, 12/01/2003, etc. However, there are also dates before 1/1/70.

I have 2 problems. One: any dates before 1/1/70 are coming out as -1. I know that php starts date at 1/1/70, but is there NO way around this limitation?

My second problem is the format of dates> 1/1/70. It looks like the number of seconds elapsed since 1/1/70 (not confirmed).

Any help?
mpgalvin
New php-forum User
New php-forum User
 
Posts: 12
Joined: Sun Jan 12, 2003 2:53 am

Re: Date before 1970

Postby WiZARD » Sun Jan 12, 2003 6:05 am

1/1/70 It's Unix date. You can't change this. Sorry.
You may solve your problem. Set not date type field, simple string and in PHP manage this.
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Postby mpgalvin » Tue Jan 14, 2003 1:20 am

Okay, sounds like a good 'solution' :wink:
mpgalvin
New php-forum User
New php-forum User
 
Posts: 12
Joined: Sun Jan 12, 2003 2:53 am


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.