epoch

Convert epoch to date in sqlplus / Oracle

Hi, I have the following table: SQL> desc recording Name Null? Type -------------------- -------- ------ CAPTUREID NOT NULL NUMBER(9) STARTDATE NOT NULL DATE ENDDATE DATE STATE NUMBER(1) ESTIMATEDENDTIME NUMBER(13) Here's a sing...

MySQL epoch time between two column epochs

Hi all, Sorry if this has been asked but can't find anything. I have a table that has two epoch timestamps (one is start of a session, other is end of a session), I want to find if a variable is in between column x and column y. I've used between to see if a column is between two variables but can't really think of the syntax for the ot...

Handling dates prior to 1970 in a repeatable way in MySQL and Python

In my MySQL database I have dates going back to the mid 1700s which I need to convert somehow to ints in a format similar to Unix time. The value of the int isn't important, so long as I can take a date from either my database or from user input and generate the same int. I need to use MySQL to generate the int on the database side, and ...

How do you create a proper Epoch calendar object in Java?

I want to create a calendar object that is the epoch date. What's the 'correct' (if any) way to do it? Date epochDate = new java.text.SimpleDateFormat ("dd/MM/yyyy HH:mm:ss z").parse("01/01/1970 01:00:00 GMT"); Calendar epochCal; epochCal.setTime(epochDate); // or maybe Calendar epochCal; epochCal.setTimeInMillis(1); ...