Re: Date handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,

Storing the date in my database isn't the issue I'm running into.  The 
problem I'm having is that if I have a date "1950-01-01", how can I display 
it in my PHP script as "Jan 1, 1950".  Or if I have "2040-04-01", how to get 
it to display as "Apr 1, 2040".  I can't see a way to do that right now in 
the core PHP code using the built-in date functions.

Thanks,
Ryan


"Robert Sossomon" <LoneWolf@xxxxxxxxx> wrote in message 
news:419A030E.3010203@xxxxxxxxxxxx
> <SNIP>
>> <?php
>> echo strtotime('1950-01-01');
>> ?>
>> I'm guessing Red Hat Enterprise or at least the kernel I'm using (which 
>> is
>> the latest RH kernel) qualifies under the Linux category above.  Also, 
>> with
>> the application I'm writing, I need to deal with dates after 2038 too. 
>> So
>> that is why I'm investigating alternatives - just because I'd like 
>> something
>> that would definitely work on any platform and is 'official' as much as
>> possible - rather than have my date handling be OS-specific.
> <SNIP>
>
> How are you entering the date into the Table?  Could you not just rewrite 
> the page so that the date information is entered differently, then format 
> it in the correct way and dump it into the table?  I would think that it 
> would work to solve your problem in dealing with dates, but that is just a 
> guess here.
>
> HTH,
> Robert 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux