convert timestamp to number ?
От | Matus fantomas Uhlar |
---|---|
Тема | convert timestamp to number ? |
Дата | |
Msg-id | 20010514170942.A13133@fantomas.sk обсуждение исходный текст |
Список | pgsql-novice |
Hello, I am processing a query that should return more timestamps, and wouls like to get them as number... +----------------------------------+----------------------------------+-------+ | Field | Type | Length| +----------------------------------+----------------------------------+-------+ | userid | text not null | var | | uid | int4 | 4 | ... | dt_modify | timestamp | 8 | ... | dt_export | timestamp | 8 | +----------------------------------+----------------------------------+-------+ there are more timestamp fields and I wanna load them to C program and compare them there. (well situation wouldn't be different if it would be perl program). I can convert number to timestamp this way: setup=> update www set dt_export=timestamp(0) where dt_export is not null; UPDATE 1 setup=> select userid,uid,dt_modify,dt_export from www where dt_export is not NULL; userid| uid|dt_modify |dt_export ------+----+----------------------+--------- uhlar |1006|2001-04-18 17:12:59+02|epoch (1 row) but I'd like to get those timestamps back in integer format. Is that possible? -- Matus "fantomas" Uhlar, sysadmin at NEXTRA, Slovakia; IRCNET admin of *.sk uhlar@fantomas.sk ; http://www.fantomas.sk/ ; http://www.nextra.sk/ There's a long-standing bug relating to the x86 architecture that allows you to install Windows. -- Matthew D. Fuller
В списке pgsql-novice по дате отправления: