I have a timestamp stored on a table in an Oracle Database, such as:
01/03/12 16:13:33,000000000
I want to convert it to seconds since Unix's Epoch to return in a query. What would be the easiestway to do it?
EDIT: oh, I need timestamp precision and can't rely on Date type here, as it has less precision.
DATEhas precision to the second. An OracleTIMESTAMPhas subsecond precision. But a Unix epoch generally only has precision to the second. So I'm not sure I understand your comment about precision. If your timestamp has milliseconds or nanoseconds, for example, how would you want to translate that into a Unix epoch? do you want to return a non-integer number? - Justin Cave