[SQL] How to display a unixtimestamp from a timestamp record?

2001-01-15 Thread Marcelo Bartsch
Hello! again i was faced to a problem i was trying to do create view in wich i had the next fields: CREATE TABLE "tbacct" ( "user_name" character varying(32), "nas_identifier" character varying(15), "nas_port" int4, "acct_session_id" character varying(15),

Re: [SQL] How to display a unixtimestamp from a timestamp record?

2001-01-15 Thread Stephan Szabo
select user_name, date_part( 'epoch' , timestamp 'acct_timestamp') from tbacct limit 2; it said ERROR: Bad timestamp external representation 'acct_timestamp' how should i represent date_part( 'epoch' , timestamp 'acct_timestamp') to work? select user_name, date_part ('epoch',