PostgreSQL La base de donnees la plus sophistiquee au monde.

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

cookbook:timestamp_postgresql_et_timestamp_unix [2008/10/14 19:40] – créée ioguixcookbook:timestamp_postgresql_et_timestamp_unix [2008/10/15 16:50] (Version actuelle) – effacée ioguix
Ligne 1: Ligne 1:
-====== timestamp PostgreSQL et timestamp Unix ====== 
  
-Pour convertir d'un timestamp PostgreSQL vers un timestamp Unix : 
-<code sql> 
-select extract(epoch from now())::bigint; 
- 
-date_part 
------------- 
-1162822549 
-(1 ligne) 
-</code> 
- 
-Pour convertir d'un timestamp Unix vers un timestamp PostgreSQL : 
- 
-<code sql>select to_timestamp(1162822549); 
- 
-to_timestamp 
------------------------- 
-2006-11-06 15:15:49+01 
-(1 ligne) 
-</code> 
- 
--- \\ 
-Jean-Paul Argudo le 06/11/2006 
 
cookbook/timestamp_postgresql_et_timestamp_unix.1224006037.txt.gz · Dernière modification : 2008/10/14 19:40 de ioguix