date-arithmetic Questions
5
Solved
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 that are the cl...
Bipropellant asked 18/12, 2012 at 8:32
1
Solved
I have two tables that look like this:
CREATE TABLE table1 (user_id int, the_date date);
CREATE TABLE table2 (user_id int, the_date date, something_else real);
I am writing a query that looks li...
Nee asked 18/7, 2012 at 7:31
3
Solved
I have a set of records that were created last week, and from those I want to retrieve only those that were created between 6h45 and 19h15. I have a column creation_date that I can use.
How can I ...
Wish asked 5/3, 2012 at 15:0
4
Solved
Possible Duplicate:
Given a time, how can I find the time one month ago
How can I print an hour ago in PHP using Date?
$date=date("Y-m-d H:i:s");
$time(-1, now);
$result=$date.$time;...
Unific asked 20/2, 2012 at 17:29
3
I have a column which is of "DATE" type and I want to run a query on it comparing it with sysdate.
But I am getting following error, Can someone please let me know what I am missing here?
SQL>...
Blitzkrieg asked 5/2, 2012 at 6:29
3
Solved
I have a books table with a returned_date column. I'd like to see the results for all of the books with a returned date that occurred in the past week.
Any thoughts? I tried doing some date math, ...
Stelmach asked 4/1, 2012 at 19:8
1
Solved
In pseudo-Oracle, I want to do the following:
select systimestamp + to_interval(select NUMERIC_COLUMN from SOME_TABLE where SOME_TABLE_PK = :stuff) from dual;
If the number of minutes were alway...
Goodrum asked 22/8, 2011 at 14:4
3
Solved
I have a date in this format {Y,M,D}. Is there any good supporting libraries or, tricks I can use to simply, say subtract three months from this date without running into problem with invalid dates...
Ordinance asked 14/7, 2011 at 15:38
6
Solved
I need to calculate the time passed between two dates.
The catch here is that I need to show it as YouTube does with its video comments timestamps. That is, to show it by just the largest measure....
Deutoplasm asked 30/5, 2011 at 14:56
4
Solved
How can I find the nearest 15 (or 10) minute interval in python ?
e.g.
>>> datetime.datetime.now()
datetime.datetime(2011, 2, 22, 15, 43, 18, 424873)
I'd like the current 15 minute inte...
Gershom asked 22/2, 2011 at 14:45
1
Solved
Without using scriptlets, what's the correct way for doing date arithmetic in JSP?
Here are examples what I'm trying to do:
Get current year (YYYY)
Subtract current year by one to get previous y...
Buddha asked 9/2, 2011 at 19:32
4
Solved
Assume this table:
id date
----------------
1 2010-12-12
2 2010-12-13
3 2010-12-18
4 2010-12-22
5 2010-12-23
How do I find the average intervals between these dates, using MySQL queries only?
F...
Irk asked 30/11, 2010 at 9:4
2
Solved
I have a table that has (among others) a timestamp column (named timestamp; it's a standard Oracle DATE datatype). The records are about 4-11 minutes apart, about 7 or 8 records every hour, and I'm...
Caitiff asked 29/11, 2010 at 22:13
4
Solved
What is the recommended way of doing date arithmetics in Perl?
Say for example that I want to know the date three days ago from today (where today = 2010-10-17 and today - 3 days = 2010-10-13). Ho...
Brunell asked 17/10, 2010 at 18:3
1
Solved
I want to find records in a (Oracle SQL) table using the creation date field where records are older than 30 days. It would be nice to find records using a operators like > but if anyone can sugges...
Frankfort asked 5/10, 2010 at 1:28
1
Solved
I have a table T1, it contains a NAME value (not unique), and a date range (D1 and D2 which are dates)
When NAME are the same, we make a union of the date ranges (e.g. B).
But as a result (X), we ...
Villeneuve asked 13/8, 2010 at 12:25
4
Solved
Possible Duplicate:
How do I calculate someone's age based on a DateTime type birthday?
I want to write an ASP.NET helper method which returns the age of a person given his or her birthda...
Demonstration asked 3/2, 2010 at 19:59
4
Solved
I need a way to determine the number of days between two dates in SQL.
Answer must be in ANSI SQL.
Yonyona asked 25/11, 2009 at 22:11
7
Solved
I find it funny that Java (or the java.util library) does not have a built-in function to calculate difference in dates. I want to subtract one date from another to get the elapsed time between the...
Hamford asked 17/1, 2009 at 14:44
© 2022 - 2024 — McMap. All rights reserved.