Storing time in mysql prior to 1970

--001636d34426131ef2047e2d56d8
Content-Type: text/plain; charset=ISO-8859-1

Hi Everyone,

I'm sure I'm missing something simple. I'm trying to store dates of birth
prior to 1970 in mysql. I've tried mysql's date_format but am hitting a
wall. I'm chasing my tail and was hoping for the best practice.

Many Thanks

Haig

--001636d34426131ef2047e2d56d8--
Haig Davis [ Mi, 27 Januar 2010 23:58 ] [ ID #2030325 ]

Re: Storing time in mysql prior to 1970

Haig,
What kind of problems are you having? I do this by using the =
date function to convert to the YYYY-MM-DD format for MySQL. I've had =
no problems with birth dates prior to 1970.

Take care,
Floyd

On Jan 27, 2010, at 5:58 PM, Haig Davis wrote:

> Hi Everyone,
>
> I'm sure I'm missing something simple. I'm trying to store dates of =
birth
> prior to 1970 in mysql. I've tried mysql's date_format but am hitting =
a
> wall. I'm chasing my tail and was hoping for the best practice.
>
> Many Thanks
>
> Haig


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Floyd Resler [ Do, 28 Januar 2010 00:05 ] [ ID #2030327 ]

Re: Storing time in mysql prior to 1970

On Wed, Jan 27, 2010 at 7:58 PM, Haig Davis <level510 [at] gmail.com> wrote:
> Hi Everyone,
>
> I'm sure I'm missing something simple. I'm trying to store dates of birth
> prior to 1970 in mysql. I've tried mysql's date_format but am hitting a
> wall. I'm chasing my tail and was hoping for the best practice.
>
> Many Thanks
>
> Haig
>

Use the types date or datetime instead of timestamp, read more about
it here: http://dev.mysql.com/doc/refman/5.1/en/datetime.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jonathan Tapicer [ Do, 28 Januar 2010 00:38 ] [ ID #2030330 ]

Re: Storing time in mysql prior to 1970

--=-QtIsqQT6Hk0ECpMSP6/C
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Wed, 2010-01-27 at 20:38 -0300, Jonathan Tapicer wrote:

> On Wed, Jan 27, 2010 at 7:58 PM, Haig Davis <level510 [at] gmail.com> wrote:
> > Hi Everyone,
> >
> > I'm sure I'm missing something simple. I'm trying to store dates of birth
> > prior to 1970 in mysql. I've tried mysql's date_format but am hitting a
> > wall. I'm chasing my tail and was hoping for the best practice.
> >
> > Many Thanks
> >
> > Haig
> >
>
> Use the types date or datetime instead of timestamp, read more about
> it here: http://dev.mysql.com/doc/refman/5.1/en/datetime.html
>


I think you may be hitting PHP's data limitations here, rather than
MySQL's. If that is the case, have a look at Pear Date, which allows you
to specify dates and times on 32-bit systems that go outside of PHP's
normal range.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-QtIsqQT6Hk0ECpMSP6/C--
Ashley Sheridan [ Do, 28 Januar 2010 00:39 ] [ ID #2030332 ]
PHP » gmane.comp.php.general » Storing time in mysql prior to 1970

Vorheriges Thema: Question on XML/XSL/PHP/MySQL
Nächstes Thema: SQL question