tags:

views:

18

answers:

1

how can I do the analogous to SELECT EXTRACT(EPOCH FROM TIMESTAMP '2001-02-16 20:38:40') in PostgreSQL, but in JDBC?

thanks

A: 

I know you are asking about JDBC, but since you tagged this as a MySQL question, here is the MySQL function you can use:

SELECT UNIX_TIMESTAMP('2001-02-16 20:38:40')

http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_unix-timestamp

Ike Walker