Re: Date handling

From: Date: Tue, 16 Nov 2004 14:22:50 +0000
Subject: Re: Date handling
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-202144@lists.php.net to get a copy of this message
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@nc.rr.com> wrote in message news:419A030E.3010203@nc.rr.com... > <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

« previous php.general (#202144) next »