Display of TIMESTAMP in 7.2 
Author Message
 Display of TIMESTAMP in 7.2

Hi all,
starting with 7.2, now() returns a time with milliseconds. If extracted
from the db and displayed verbatim, it shows up as
'2002-02-05 10:59:36.717176+02'.

Unfortunately, I have a lot of code that displays the date/time directly
from the db on a web page without any to_char transformation and now
that is quite harder to understand. Is there any way to have an implicit
formatting back that trims the milliseconds on a per-connection
variable?

--

APL Financial Services           http://www.***.com/
Nicosia, Cyprus                 phone: +357-22-755750

"It is more complicated than you think"
                -- The Eighth Networking Truth from RFC 1925

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Sat, 24 Jul 2004 20:47:10 GMT
 Display of TIMESTAMP in 7.2

Instead of using now(), you could use timenow(), which displays the date
and time without the microseconds.

There's stuff on this in the manual, section 3.4 of the 7.1 documentation.

J

Quote:

> Hi all,
> starting with 7.2, now() returns a time with milliseconds. If extracted
> from the db and displayed verbatim, it shows up as
> '2002-02-05 10:59:36.717176+02'.

> Unfortunately, I have a lot of code that displays the date/time directly
> from the db on a web page without any to_char transformation and now
> that is quite harder to understand. Is there any way to have an implicit
> formatting back that trims the milliseconds on a per-connection
> variable?



Sat, 24 Jul 2004 23:37:45 GMT
 Display of TIMESTAMP in 7.2
Try using CURRENT_TIMESTAMP instead of now() maybe?

Chris

Quote:
> -----Original Message-----


> Bragadini
> Sent: Tuesday, 5 February 2002 8:19 PM
> To: PostgreSQL Hackers
> Subject: [HACKERS] Display of TIMESTAMP in 7.2

> Hi all,
> starting with 7.2, now() returns a time with milliseconds. If extracted
> from the db and displayed verbatim, it shows up as
> '2002-02-05 10:59:36.717176+02'.

> Unfortunately, I have a lot of code that displays the date/time directly
> from the db on a web page without any to_char transformation and now
> that is quite harder to understand. Is there any way to have an implicit
> formatting back that trims the milliseconds on a per-connection
> variable?

> --

> APL Financial Services             http://village.albourne.com
> Nicosia, Cyprus                    phone: +357-22-755750

> "It is more complicated than you think"
>            -- The Eighth Networking Truth from RFC 1925

> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command



Sun, 25 Jul 2004 13:21:10 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. timestamp function in 7.2

2. timestamp in 7.1 vs 7.2

3. timestamp in 7.2

4. 7.2 and current timestamp bug?

5. SQL UDF not being displayed in the 7.2 Control Center

6. Regression Test Failure on PG 7.2 under RH 7.2

7. Redhat 7.2 and D3/Linux 7.2

8. If I uninstall 7.2 from my PC and install 8.1 can I administrate remote 7.2 UDB

9. Displaying Native timestamp format in VB 6

10. To retrieve a TIMESTAMP data type field from SQL and display in ASP


 
Powered by phpBB® Forum Software