date-arithmetic Questions
2
Solved
I am trying to create a simple function and I cannot seem to pass in a parameter into the date function.
Here is the function:
CREATE OR REPLACE FUNCTION test(source int,days text)
RETURNS integer...
Scatter asked 10/6, 2015 at 14:4
8
Solved
I read a book about operators in Javascript, and this confused me.
console.log("5"+1);
This would make "5" as a string. So the result would be 51.
console.log("5"-1);
This result would ...
Reconnoitre asked 27/5, 2015 at 7:23
4
Solved
I have the below view, what I need to do is to get the date difference of the field ActionDate between each 2 records having the same Vehicle AND OrderCode, how can I achieve this in Oracle databas...
Claiborne asked 7/5, 2015 at 10:23
4
Solved
In my database table I have a field for date (varchar field to save date in yy-mm-dd format ), now I want to select records for two weeks ago.
How can i do it ?
Typographer asked 6/9, 2013 at 15:21
5
Solved
I am using oracle database. I want to execute one query to check the data between two dates.
NAME START_DATE
------------- -------------
Small Widget 15-JAN-10 04.25.32.000000 PM
Product 1 17-JA...
Stator asked 3/3, 2010 at 6:36
9
I have to calculate all the invoices which have been paid in the first 'N' days of a month. I have two tables
. INVOICE: it has the invoice information. The only field which does matter is called ...
Sheeting asked 11/5, 2009 at 17:11
2
Solved
Thanks to Mike for the suggestion to add the create/insert statements.
create table test (
pid integer not null,
date date not null,
primary key (pid, date)
);
insert into test values
(1,'201...
Coakley asked 30/1, 2015 at 0:40
2
Solved
I'm using PostgreSQL 8.4. I have a table column with timestamps (timestamp without timezone). For instance:
date
-------------------
2014-05-27 12:03:20
2014-10-30 01:20:03
2013-10-19 16:34:34
201...
Tolbooth asked 29/12, 2014 at 12:58
3
SELECT COALESCE (
(to_timestamp( '2014-09-22 16:00:00','yyyy/mm/dd HH24:MI:SS')
- ('2014-09-22 09:00:00' ,'yyyy/mm/dd HH24:MI:SS'))
- (to_timestamp( '2014-09-22 16:00:00','yyyy/mm/dd HH24:MI:SS...
Precessional asked 8/10, 2014 at 10:2
5
Solved
Over the years I have come across different interpretations of the end of a day.
But what is the correct way of representing it when comparing dates and intervals?
I have found that some people se...
Yorker asked 7/10, 2014 at 23:1
2
Solved
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
output like
result: 23:00:00
I am getting result like
Hours Min...
Mario asked 22/9, 2014 at 11:32
1
Solved
To extract the week of a given year we can use:
SELECT EXTRACT(WEEK FROM timestamp '2014-02-16 20:38:40');
However, I am trying to group weeks together in a bit of an odd format. My start of a wee...
Pail asked 18/8, 2014 at 17:59
2
Solved
I read some posts here and seems like nothing special but I can not still select the entries of the last days.
SELECT
p1.kArtikel,
p1.cName,
p1.cKurzBeschreibung,
p1.dLetzteAktualisierung, ...
Reshape asked 17/6, 2014 at 20:1
3
Solved
The Problem
I have a PostgreSQL database on which I am trying to summarize the revenue of a cash register over time. The cash register can either have status ACTIVE or INACTIVE, but I only want to...
Renault asked 7/3, 2014 at 15:4
1
Solved
I got stuck in part of the script. I have time: for example "16:00" and duration in minutes like: 410.
Is there any easy way to add those two values? I've tried a lot of combinations with date -d,...
Jinks asked 18/1, 2014 at 18:55
1
Solved
I want to get total number of days between two provided dates. I've tried the below query but didn't get the exact different; the last date is not being included.
select (to_date ('15-06-13','dd-M...
Felicidadfelicie asked 21/12, 2013 at 17:6
1
Solved
I'm trying to write a script which is supposed to send out an email and create two calender entries when submitting a form. To be honest, this is my first script and I am very happy that the email ...
Suppository asked 18/11, 2013 at 22:17
1
Solved
If I have a given date in the format yyyy-mm-dd, how can I calculate the difference in days to the current date ?
I just want to check whether this date is more than one week (7 days) old co...
Dragon asked 16/11, 2013 at 8:4
2
Solved
I want to get the date of the next Monday after the current date.
So if today's date is 2013-08-09 (Friday) then I want to get the date 2013-08-12.
How can I do this?
Edd asked 9/8, 2013 at 13:49
2
Solved
I have a specific problem; I have data in the following format:
# USER_ID SUBMISSION_DATE CONTRACT_REF
1 1 20/6 1:00 W001
2 1 20/6 2:00 W002
3 1 20/6 3:30 W003
4 4 20/6 4:00 W004
5 5 20/6 5:00 W00...
Scuff asked 6/8, 2013 at 23:13
2
Solved
I am executing the following piece of code. I am not sure why the calculation is happening in octal? How can I make this code better?
#!/bin/bash
gmthour=$(date -u +%H)
localhour=$(date +%H)
echo ...
Chlorpromazine asked 1/7, 2013 at 22:26
6
Solved
In my PHP code I have a date in my variable "$postedDate".
Now I want to get the date after 7 days, 15 days, one month and 2 months have elapsed.
Which date function should I use?
Output date for...
Depressive asked 6/5, 2009 at 6:48
2
Solved
I have a dataset with locations and dates. I would like to calculate week of the year as number (00–53) but using Thursday as the first day of the week. The data looks like this:
location <- ...
Eipper asked 7/3, 2013 at 17:45
2
For example I have two images, where first one is a regular and second one with a color inversion (I mean 255 - pixel color value).
I've applied SIFT algorithm to both of them using OpenCV and Low...
Stony asked 23/2, 2013 at 8:55
3
Solved
When I run queries using DATEADD it seems that the database does not recognize this function.
also when I just run select DATEADD(Month, -3, GETDATE()) I'm getting:
Error code -1, SQL state 42X01:...
Fissi asked 27/8, 2012 at 7:56
© 2022 - 2024 — McMap. All rights reserved.