Epoch time conversion Syntax

Moderator: NorbertKrupa

Post Reply
Jess.mic
Newbie
Newbie
Posts: 15
Joined: Tue Jun 11, 2013 11:02 pm

Epoch time conversion Syntax

Post by Jess.mic » Thu Jul 18, 2013 10:26 pm

Hi , I want to understand the difference between below two epoch time conversion syntax:-

1. (((TO_DATE(CAST(CURRENT_DATE as varchar(8)),'YYYYMMDD') - TO_DATE('1970-01-01','YYYY-MM-DD')) * 86400) + 28800)

and

2. extract(epoch from date(CURRENT_DATE ))


Which one is better??

Post Reply

Return to “Vertica SQL”