projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fb3ec1
)
Add example for converting epoch back to timestamp.
author
Peter Eisentraut
Tue, 16 Dec 2003 15:27:58 +0000
(15:27 +0000)
committer
Peter Eisentraut
Tue, 16 Dec 2003 15:27:58 +0000
(15:27 +0000)
doc/src/sgml/func.sgml
patch
|
blob
|
blame
|
history
diff --git
a/doc/src/sgml/func.sgml
b/doc/src/sgml/func.sgml
index d73199fb20e5ba2984e79507c837e7a33fe1c776..5724b9b2561442a898f7336637ecb909d3fead15 100644
(file)
--- a/
doc/src/sgml/func.sgml
+++ b/
doc/src/sgml/func.sgml
@@
-1,5
+1,5
@@
@@
-5005,6
+5005,15
@@
SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-08');
SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
Result:
442800
+
+
+
+ Here is how you can convert an epoch value back to a time
+ stamp:
+
+
+
+SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720 * interval '1 second';