From: | eric(dot)jones(at)hua(dot)army(dot)mil |
---|---|
To: | jason(dot)earl(at)simplot(dot)com, eric(dot)jones(at)hua(dot)army(dot)mil |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: EASY!!! Timestamp conversion & php |
Date: | 2002-06-05 21:04:41 |
Message-ID: | 506889585A61D5119B460008C7A47E650208741A@HUADOIMC2PO |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
CLASSIFICATION: UNCLASSIFIED
Thanks! That worked perfectly... I'll be sure to brush up on that chapter :)
FYI, I work for the US Army as a contractor and they require that I classify
each email I send out.... :)
Eric Jones (Contractor)
FDIC Web Enabler
E-mail: jonese(at)hua(dot)army(dot)mil
Office - 520-533-6628
Cell - 520-980-2136
Email Pager - 5209802136(at)messaging(dot)nextel(dot)com
-----Original Message-----
From: Jason Earl [mailto:jason(dot)earl(at)simplot(dot)com]
Sent: Wednesday, June 05, 2002 11:50 AM
To: eric(dot)jones(at)hua(dot)army(dot)mil
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] EASY!!! Timestamp conversion & php
I couldn't help but answer an email that starts:
CLASSIFICATION: UNCLASSIFIED
What you need to do is take a look at the to_char function in Chapter 4.7 of
the PostgreSQL User's Guide.
For example if you wanted to get the current timestamp in the format you
specified you would need to do something like:
SELECT to_char(CURRENT_TIMESTAMP, 'FMMonth FMDD, YYYY HH24:MI');
Jason
eric(dot)jones(at)hua(dot)army(dot)mil writes:
> CLASSIFICATION: UNCLASSIFIED
>
> Can anyone tell me how to convert this PG timestamptz: 2002-06-05
> 10:39:02.480922-07
>
> To June 5, 2002 10:39
>
> I try this code:
>
> <?=date("M j, Y",strtotime(2002-06-05 10:39:02.480922-07))?>
>
> And I get Dec 31, 1969 so I know it's not working....
>
> Help!!!
>
> Eric Jones (Contractor)
> FDIC Web Enabler
> E-mail: jonese(at)hua(dot)army(dot)mil
> Office - 520-533-6628
> Cell - 520-980-2136
> Email Pager - 5209802136(at)messaging(dot)nextel(dot)com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
From | Date | Subject | |
---|---|---|---|
Next Message | Zhou, Lixin | 2002-06-05 21:24:19 | Re: a trigger question |
Previous Message | sheetal | 2002-06-05 20:06:36 | Help... |