date-arithmetic Questions

7

Solved

function leapYear(year){ var result; year = parseInt(document.getElementById("isYear").value); if (years/400){ result = true } else if(years/100){ result = false } else if(years/4)...

5

Solved

I would like to do simple date calculations in Java. For example, compute the difference in days between to dates (having a 0 time component). Of course you could do a simple substraction of millis...
Washy asked 13/3, 2009 at 16:1

4

Solved

I am trying to get a DATETIME field from a DATE and a TIME field. none of the functions in MYSQL seems useful. Is somebody aware how to do this or that if this can even be done? :)
Ciaphus asked 22/7, 2010 at 9:43

4

Solved

I'm having issues with what I assumed would be a simple problem, but googling isn't helping a great load. Possibly I'm bad at what I am searching for nether the less. SELECT ORDER_NUMB, CUSTOMER_N...
Arana asked 6/10, 2015 at 14:14

3

i need to find the difference between the time in the format hh:mm:ss select msglog.id,max(msglog.timestamp) enddate, min(msglog.timestamp) startdate, enddate - startdate from MESSAGELOG msglo...
Undenominational asked 13/1, 2014 at 17:0

6

Solved

I have a datetime column in Oracle (MM/DD/YYYY HH:MM:SS AM/PM) but when I do this: SELECT MAX(D_DTM)-1 FROM tbl1 ...it goes back a day. How do I remove one hour from the column rather than one d...
Moreau asked 18/4, 2013 at 13:35

9

Solved

I need to get the difference between two dates say if the difference is 84 days, I should probably have output as 2 months and 14 days, the code I have just gives the totals. Here is the code SELE...
Muth asked 16/7, 2012 at 7:49

5

Solved

I have an NSDate and a duration. I need to get the time after the duration Given: The date is "2010-02-24 12:30:00 -1000" duration is 3600 secs I need to get "2010-02-24 13:30:00 -1000" I thou...
Deception asked 24/2, 2010 at 20:33

2

Solved

I'm having some trouble working with the as.Date function in R. I have a vector of dates that I'm reading in from a .csv file that are coming in as a factor of integers or as character (depending o...
Deckle asked 12/9, 2016 at 20:41

3

Solved

How can I determine the (ISO 8601) week number in a Windows batch file? Unfortunately WMIC PATH WIN32_LOCALTIME GET /FORMAT:LIST only has WeekInMonth... I have found some very complex solutions. ...
Mats asked 7/9, 2016 at 15:58

4

Solved

I am quite a beginner when it comes to Oracle. I am having trouble figuring out how to do something similar to this : SELECT ID, NAME, TO_CHAR(DATEBIRTH, 'DD/MM/YYYY HH24:MI:SS') FROM PEOPLE WHER...
Arabia asked 7/9, 2011 at 15:20

3

Solved

I have a data frame with multiple date ranges (45 to be exact): Range Start End 1 2014-01-01 2014-02-30 2 2015-01-10 2015-03-30 3 2016-04-20 2016-10-12 ... ... ... They will never overlap I als...
Indeterminism asked 21/6, 2016 at 0:21

3

Solved

I have a page with a number of variables that contain a date in string format (yyyy-mm-dd) which originates from using moment.js. Is there a way I can pass such a variable to a Javascript date ob...
Spectroradiometer asked 5/3, 2014 at 3:58

5

Solved

I have sql something like this: SELECT EMP_NAME, DEPT FROM EMPLOYEE WHERE TIME_CREATED >= TO_DATE('26/JAN/2011','dd/mon/yyyy') -> This returns 10 rows and TIME_CREATED = '26-JAN-2011' Now wh...
Multiplechoice asked 19/7, 2011 at 15:3

6

Solved

Does anyone have a good algorithm to calculate what date Good Friday falls on given the year as an input? Preferably in C#.
Sarabia asked 24/3, 2010 at 18:26

6

Solved

I have a rather weird problem. I live in denmark and here the first week (Week 1) of 2013 starts the 31th of december 2012 and lasts for 7 days - as weeks normally do :) According to .NET however ...
Imparisyllabic asked 30/8, 2012 at 12:20

4

Solved

How do I find out how many of a given weekday (ex: Tuesdays) are in a date range using Moment JS and jQuery? I can find the number of days using Difference: http://momentjs.com/docs/#/displaying/d...
Antin asked 17/3, 2015 at 3:34

3

I am developing an algorithm with Postgres (PL/pgSQL) and I need to calculate the number of working hours between 2 timestamps, taking into account that weekends are not working and the rest of the...

2

Solved

I have to select some data from Oracle 11g database, but I can't seem to figure out why following select query is failing: SELECT INFO_ID, INFO_DETAIL, IMPORTANT_FLG, DELETE_FLG, CREATE_TI...
Snaggy asked 13/11, 2015 at 7:0

6

Solved

I need to compare two dates using the Oracle decode function to see if one is less than or equal to the other. I found this article - http://www.techonthenet.com/oracle/functions/decode.php Which...
Foil asked 1/9, 2010 at 15:12

4

Solved

This is my current oracle table: DATE = date HOUR = number RUN_DURATION = number I need a query to get RUN_DURATION between two dates with hours like Select * from Datatable where DATE BETWE...
Iconoclast asked 14/8, 2015 at 9:17

5

Solved

I saw examples for C#, Java, but for C++ i cant find solution to calculate how many days between two dates. For example between 2012-01-24 and 2013-01-08 Thanks!
Walterwalters asked 8/1, 2013 at 15:53

3

Solved

Let's suppose that today is Wednesday. I can break an NSDate down into NSDateComponents, but I need to find the NSDate with the next upcoming Monday. If today is Monday, then the next upcoming Mond...
Punctate asked 31/7, 2015 at 7:24

2

Solved

We have a machine running 24x7. Every day I report the number of pieces it produced per hour. In our case one working day means '2015-06-16 06:00:00' to '2015-06-17 06:00:00' for example. Here is ...
Giraudoux asked 17/6, 2015 at 14:18

4

Solved

How can I change the default timezone in R? I'm working with time series. All my time series are defined in UTC time zone, but if I print a date it is always done in CET/CEST time zone.
Dowitcher asked 16/6, 2011 at 15:55

© 2022 - 2024 — McMap. All rights reserved.