Questions tagged [hour]

457 questions
6
votes
2 answers

How to set hour minute in nsdate programmatically?

I have 2:01:20 PM format in one label; after some calculations, I need to change the hour and/or minute of that label. That is ,Is it possible to change that label value, by converting it as NSDate object and modifying hour and minute like 3:20:30…
mac
  • 4,760
  • 7
  • 31
  • 33
6
votes
1 answer

how can I sum or average hours in R

Why does sum and average do not work on hours extracted using lubridate, when simple addition using + and division works individually. Dataset Category Time1 Time2 hr1 hr2 1 A 0:30:00 24:00:00 30M 0S 24H 0M 0S 2 …
Shoaibkhanz
  • 1,942
  • 3
  • 24
  • 41
6
votes
2 answers

Grouping records hour by hour or day by day and filling gaps with zero or null in mysql

I have written a query that counts records hour by hour: select TO_CHAR(copied_timestamp, 'YYYY-MM-DD HH24'),count(*) from req group by TO_CHAR(copied_timestamp, 'YYYY-MM-DD HH24'); the result is: 2012-02-22 13 2280 2012-02-22 15 …
Mehdi
  • 4,396
  • 4
  • 29
  • 30
5
votes
1 answer

How to choose initial, period, horizon and cutoffs with Facebook Prophet?

I have around 23300 hourly datapoints in my dataset and I try to forecast using Facebook Prophet. To fine-tune the hyperparameters one can use cross validation: from fbprophet.diagnostics import cross_validation The whole procedure is shown…
Tobitor
  • 1,388
  • 1
  • 23
  • 58
5
votes
3 answers

Sum of time with result more than 24 hours

Suppose the following snippet: LocalTime test = LocalTime.of(21, 14); test.plusHours(5); The result would be, normally, 02:14 but I want to sum beyond the 24 hour limit, so the result would be 26:14. In this case I have a field that an user can…
athosbr99
  • 463
  • 2
  • 7
  • 24
5
votes
4 answers

java HOUR and HOUR_OF_DAY both returning 12-hr time

I am using the following code to try to get the HOUR_OF_DAY (0-23) of a unix timestamp, converted to milliseconds. The timestamp '1296442971' converts to Sun Jan 30 2011 22:02:51 GMT-0500 (EST). I'm running the following code to try to get the…
TomBomb
  • 3,236
  • 5
  • 31
  • 40
5
votes
1 answer

Create custom date range, 22 hours a day python

I'm working with pandas and want to create a month-long custom date range where the week starts on Sunday night at 6pm and ends Friday afternoon at 4pm. And each day has 22 hours, so for example Sunday at 6pm to Monday at 4pm, Monday 6pm to Tuesday…
A1122
  • 1,324
  • 3
  • 15
  • 35
5
votes
1 answer

How to schedule a Jenkins job each 15 minutes

I need to schedule a jenkins job each 15 minutes. Currently i'm using the Build periodically feature but that enables me to schedule the job once in 1 hour maximum. What i got now is: 15 * * * * is running the job HOURLY (each XX:15) 15 0 * * * is…
shayms8
  • 671
  • 6
  • 13
  • 28
5
votes
5 answers

Java Swing GUI hour glass

There is a JTabbedPane In my Swing program. When user clicks on a tab, the program takes a while to get the data and process the results, then shows the results in the selected tab. How can I display a hour glass, or something of that effect so that…
Frank
  • 30,590
  • 58
  • 161
  • 244
5
votes
3 answers

CONVERT decimal DAYS to TIME format

Hello iam a newbie in sql and i need your help. I have the following table: start_date | end_date 02.08.2012 09:27:19 | 06.08.2012 07:53:00 06.08.2012 06:58:58 | 06.08.2012 13:42:33 05.06.2012 14:35:58 | 05.06.2012…
user2588995
  • 51
  • 1
  • 2
5
votes
1 answer

Grouping records hour by hour or day by day and filling gaps with zero or null

I have written a query that counts records hour by hour: select TO_CHAR(copied_timestamp, 'YYYY-MM-DD HH24'),count(*) from req group by TO_CHAR(copied_timestamp, 'YYYY-MM-DD HH24'); the result is: 2012-02-22 13 2280 2012-02-22 15 …
Mehdi
  • 4,396
  • 4
  • 29
  • 30
4
votes
1 answer

SQL add Datetime add hour add Minute

In my table I have DateTime, Hour column. example : 2012-05-14 00:00:00.000 and 1230 How can I add this hour column into my Datetime column, so I can have 2012-05-14 12:30:00.000 I tried with this: SELECT DATE_DEBUT, HEURE_DEBUT, DATEADD(hour,…
user609511
  • 4,091
  • 12
  • 54
  • 86
4
votes
2 answers

Calculate difference between 2 dates considering Daylight Saving Time

Given a start date, and a number of days, I need to display the end date = start date + number of days. So I did something like this: var endDate=new Date(startDate.getTime()+ONE_DAY); Everything works fine, except that for 25 and 26 October gives…
zozo
  • 8,230
  • 19
  • 79
  • 134
4
votes
2 answers

Comparing hours in java

First of all forgive my English :-( I have a problem with hours on java. Let's see it by an example: DateFormat datos = new SimpleDateFormat ("hh:mm:ss"); Date ac, lim; String actual,limit; actual="18:01:23"; …
user1297810
  • 53
  • 1
  • 2
  • 5
3
votes
5 answers

How to calculate two hours from two times?

I have two times like 10:00 am and 7:00 pm. And from this I want to get the total hours. As from that time I have to get the 9 hours. How will I do this? I have explode it with the : but it then subtract 7 from 10 and return the result 3 which is…
Ahmad
  • 2,099
  • 10
  • 42
  • 79
1 2
3
30 31