Fred Pym
Fred Pym

Reputation: 2329

Netezza - How to convert timestamp/datetime to 13-digit UNIX time millis?

I have read some reference about Netezza, but I cannot figure out how to convert timestamp/datetime value to 13-digit UNIX time millis.

Any suggestion or ideas?

Upvotes: 1

Views: 1932

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1269703

Postgres offers the extract(epoch from . . .) function that does exactly what you want:

select extract(epoch from <datetimecol>) * 1000

This has been in Postgres for a long time, so I would guess that Netezza also supports it.

Upvotes: 2

Related Questions