Top "Date-arithmetic" questions

The term 'date-arithmetic' refers to determining via code such information as how many days, hours, etc.

How to get the closest dates in Oracle sql

For example, I have 2 time tables: T1 id time 1 18:12:02 2 18:46:57 3 17:49:44 4 12:19:24 5 11:00:01 6 17:12:45 and T2 id time 1 18:13:02 2 17:46:57 I need to get time from T1 …

sql oracle date-arithmetic
How to add a time interval to an NSDate?

I have an NSDate and a duration. I need to get the time after the duration Given: The date is "2010…

objective-c cocoa cocoa-touch nsdate date-arithmetic
Calculate days between date and today in PHP

If I have a given date in the format yyyy-mm-dd, how can I calculate the difference in days to the …

php date-arithmetic
Time Difference in Redshift

how to get exact time Difference between two column eg: col1 date is 2014-09-21 02:00:00 col2 date is 2014-09-22 01:00:00 …

sql amazon-redshift date-arithmetic
Why is Date is being returned as type 'double'?

I'm having some trouble working with the as.Date function in R. I have a vector of dates that I'm …

r date date-arithmetic
SQL: Is it possible to SUM() fields of INTERVAL type?

I am trying to sum INTERVAL. E.g. SELECT SUM(TIMESTAMP1 - TIMESTAMP2) FROM DUAL Is it possible to write …

sql-server oracle tsql plsql date-arithmetic
Number of days between two dates - ANSI SQL

I need a way to determine the number of days between two dates in SQL. Answer must be in ANSI …

sql date date-arithmetic ansi-sql
Calculate working hours between 2 dates in PostgreSQL

I am developing an algorithm with Postgres (PL/pgSQL) and I need to calculate the number of working hours between 2 …

sql postgresql date-arithmetic generate-series range-types
Calculate Date/Time Difference in Java considering AM/PM

I want to calculate the difference between two date/time in java using Date and Calendar classes. The format that …

java date calendar date-arithmetic date-difference
How to do date calculations in Shell Scripting?

I have a shell script that runs every night to backup my EC2 sites database and html to S3, and …

bash shell date-arithmetic