Questions tagged [hour]

The tag has no usage guidance.

hour
Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

NetCDF XArray time slice 12 midday 12 midnight NARR reanalysis data

stack overflow (think it's been over 10 years) but I am well and truly stuck! I am trying to reduce the NARR reanalysis data to pass through a relatively simple calculation to replicate this analysis ...
1 vote
1 answer
26 views

Pandas aggregating hours in group by

I have this table: Date User ID Calls Hours 3-9-2022 2234 10 01:06:19 3-9-2022 2234 4 00:32:54 That I want to group into (resetting index as well): Date User ID Calls Hours 3-9-2022 2234 14 01:...
18 votes
2 answers
42k views

Extracting date, hour and minute from Instant.now() generated date

I have this code that generates a date and time, ZoneId z = ZoneId.of( "Africa/Nairobi" ); Instant instant = Instant.now(); ZonedDateTime zdt = instant.atZone(z); return zdt.toString(); ...
85 votes
4 answers
188k views

Java getHours(), getMinutes() and getSeconds()

As I know getHours(), getMinutes() and getSeconds() are all deprecated in Java and they are replaced with Calendar.HOUR_OF_DAY, Calendar.MINUTE, Calendar.SECOND. These will in fact return the hour, ...
0 votes
2 answers
63 views

Subtotal SUM does not work properly when more than 24 hours

I have the following data in column H: =SUBTOTAL(109;H3:H9999) hours 02:15 03:30 03:30 00:15 00:15 02:00 00:30 00:30 04:00 00:30 05:45 02:15 00:30 02:00 01:00 I want to have the subtotal with ...
31 votes
3 answers
52k views

Java8 Adding Hours To LocalDateTime Not Working

I tried like below, but in both cases, it is showing the same time. What am I doing wrong? LocalDateTime currentTime = LocalDateTime.now(ZoneId.of("UTC")); Instant instant = currentTime....
0 votes
3 answers
2k views

How to get minutes in the form of hours days weeks months years PHP [duplicate]

I am struggling very hard to achieve this but the results are not what i am trying to get.The result values are wrong and the colons are not on their proper place when using random minute values(that ...
0 votes
1 answer
73 views

Hours between two dates and 2 shifts

I need to calculate total hours between two dates, considering two shifts: 06:30-16:30 and 18:30-04:30, from Monday to Friday, excluding weekends. start date with time start date with time Overtime ...
0 votes
1 answer
322 views

PIR Motion Sensor triggers every hour

I have Onyehn PIR Motion Sensor connected to a Raspberry Pi Zero, which detects motion when it actually happens. However, it also detects motion every hour, even when it is sealed in a box. Is there ...
0 votes
1 answer
57 views

Create hourly count for multiple days with separate columns that each only has date and time

I have a server that contains a column with date only(datetime) and the other with time only(char), but I'm trying to create hourly counts with the code below but it's not showing up as expected: ...
7 votes
3 answers
25k views

Oracle PLSQL truncate datetime to specific hours

I have an Oracle PLSQL code generating a list of datetime stamps and I would like to truncate them to the specific hours of 7am and 7pm rather than the beginning of the day. For example: 01/03/2013 ...
12 votes
2 answers
65k views

How can I extract just the hour of a timestamp using standardSQL

How can I extract just the hour of a timestamp using standardSQL. I've tried everything and no function works. The problem is that I have to extract the time from a column and this column is in the ...
1 vote
2 answers
723 views

Set a minute range in an input time HTML5

I have an Angular project, where one of the components have an input time like: <div class="start"> <p>Inicio:</p> <input type="time" class="form-...
8 votes
2 answers
4k views

How can I select hourly counts from a table, including missing hours?

I'm looking to gather counts by hour. But not every hour is represented in my table. To make sure the data always includes empty hours, I built an hour table that has hours in datetime from 2000-2037....
0 votes
0 answers
17 views

Time between constrained datatimes

I need to calculate the operating time between failures of a equipment, respecting its operating schedule. Basically I have a corrective maintenance dataframe with the start and end time in the format ...
0 votes
2 answers
67 views

PHP Laravel - Finding the quantity of seconds in each hour between two timestamps

I'm trying to track the time someone is spent logged onto a system. I need to be able to group the total seconds spent logged in into hours. A user might have a logged on and logged off event that ...
0 votes
2 answers
561 views

Get transactions done in an hour from each other (not group by hour)

I have a problem that I have been struggling with for a while now. If someone can please help me, that would be great. It is on SQL Server 2012. I have a table with a set number of transactions and ...
94 votes
13 answers
254k views

Add 'x' number of hours to date

I currently have php returning the current date/time like so: $now = date("Y-m-d H:m:s"); What I'd like to do is have a new variable $new_time equal $now + $hours, where $hours is a number of hours ...
1 vote
2 answers
310 views

How to iterate through hour from date time in ruby

In my use case I have to get the hours between two dates in ruby[Not rails]. For example hours between 2015-10-25T22:04:55Z to 2015-10-26T08:30:35Z should be [2015-10-25-23, 2015-10-26-00, 2015-10-...
0 votes
1 answer
8k views

How to report on hours per period in Azure Devops?

I can't work out how to report how many hours per week were recorded by each team member. For example if a task is 20 hrs, and 10 hours was done last week, and 10 this week, how can I tell how meany ...
0 votes
1 answer
46 views

How to find minimum first and last hour for each shift in Excel

I want to find first and last time for each shift of the day: Shift Start Hour End Hour Day Shift 7:00 15:00 Day Shift 15:00 22:00 Night Shift 23:00 02:00 Night Shift 02:00 06:00 Shift First ...
1 vote
1 answer
46 views

Trying to SUM working hours after midnight

I have this formula: =ROUNDDOWN(((B1-A1)*24) ; 1) which calculates the duration between two times (B1=end time, A1=start time) and then converts it to decimal. The current problem I have with this ...
0 votes
1 answer
60 views

How to get a list of hours between two timestamp?

I want to get all hours between two timestamps. For example from 2023-02-23 14:38 to 2023-02-23 19:32 The result should be 14 15 16 17 18 19 better i get also additional the minutes in the ...
-1 votes
1 answer
286 views

convert Date to RFC Date time [closed]

I have a date field in the input as below oldDate = 12-FEB-23 I want to convert this to newDate = Sun Feb 13 05:30:00 IST 2023 using java 8 . Please help Both oldDate and newDate are of Date type. ...
1 vote
1 answer
63 views

Changing weather data frequency from 3 hours to 1 hour

I have weather data which has the following column where the first 3 rows look like this date hour city condition snow rain 2023-01-30 3 berlin snow 1 0 2023-01-30 6 berlin rain 0 1 2023-01-30 9 ...
-1 votes
1 answer
229 views

How to turn hours into quarters of an hour

I have values ​​in the data frame for the following hours in days: 0,1, 2, 3, 4, ..., 23. But I would like to divide these hours into quarters of an hour 00:15, 00:30, 00:45, ..., 23:45, 00:00 I would ...
0 votes
1 answer
72 views

Need to pull records from previous full hour regardless of time the query runs

I want to pull records from the previous Full hour from when the query runs. By this I mean regardless if it runs at 2:05 or 2:15 I will get records from 1:00:00 to 1:59:59. Currently I get ORA-00907: ...
117 votes
9 answers
133k views

How do I get hour and minutes from NSDate?

In my application I need to get the hour and minute separately: NSString *currentHour=[string1 substringWithRange: NSMakeRange(0,2)]; int currentHourInNumber=[currentHour intValue]; Consider ...
0 votes
1 answer
108 views

Obtaining hourly average data from 1 minute dataframe

I have a data set in 1 minute interval, but I am looking for a way to convert it to hourly average. I am new to R programming for data analysis. Below is an example of how my data looks. Please if ...
0 votes
0 answers
37 views

MySQL - get average of temperature for every 6 hours

I have created_at column in my table. Let's say data as follows- I want to get the average of temperature of each 6 hour segment. Let's say time starts from first hour of the day. Thus, my rows will ...
0 votes
0 answers
114 views

Jquery: How to detect Input[type="time"] is almost or completely filled

I can not find solution to detect that an input type time is almost (hour) or completely (hour + minute) filled . This solution could allow me to prevent that a period is completely write: ex : ...
2 votes
4 answers
5k views

How to add and subtract hours and minutes

I have some problems. I am a beginner programmer. I need to create an application like a clock with Android Studio and need to add and subtract hours and minutes. When I press the +1H will need to add ...
0 votes
1 answer
745 views

Vuetify v-calendar next day

I'm trying to create a v-calendar with vuetify. The problem is that I can't start at 10:00 and show 3:00 the next day. How can I display it until 3 o'clock the next day? <v-calendar ref="...
1 vote
2 answers
482 views

How to I get a range of times from a start time and end times with an hour difference using PHP?

$course_hour = 1; $starttime = '07:00'; $endtime = '16:00'; I wish if it could return an array of values like below: If $course_hour = 1; $return_array = array('07:00 - 08:00', '08:00 - 09:00', '09:...
-1 votes
2 answers
531 views

How to calculate time difference in python?

Example: 9:43 - 17:27 - how many hours and minutes elapsed between those times ?
0 votes
0 answers
546 views

What timestamp format is "xTxx:xx:xx"?

I have come across a certain attribute that returns timestamp values in a format like - "xTxx:xx:xx". What does the first 'x' signify? My first guess was that the first 'x' stands for days ...
-1 votes
1 answer
117 views

Datetime with offset? [closed]

Datetime.Today changes at exactly midnight to the next day. Is there any way of making the day change at 3am instead of 12? Using c#
-1 votes
2 answers
49 views

mysql fetch data between hours [hh:mm:ss]

Fetch records between hours For example records below, i have tried to fetch the data between morning hours(07:30 to 19:30) and evening hours(19:30 to 07:30), but getting blank results while querying ...
0 votes
0 answers
64 views

Is data.table::hour() unstable?

I was trying to calculate the hour of some timestamps and I noticed some very strange results: It looks like there is some input that breaks the function completely (not only does it produce 0 as a ...
10 votes
2 answers
49k views

extract hour from timestamp with python

I have a dataframe df_energy2 df_energy2.info() <class 'pandas.core.frame.DataFrame'> RangeIndex: 29974 entries, 0 to 29973 Data columns (total 4 columns): TIMESTAMP 29974 non-null ...
0 votes
2 answers
150 views

How to convert array of working hours into 24 hour format?

I have a set of arrays like this in PHP. ["Monday"]=> string(7) "8AM-4PM" ["Tuesday"]=> string(7) "8AM-4PM" ["Wednesday"]=> string(7) ...
0 votes
1 answer
169 views

Twilio Flow the widget looks like Liquid variables %H

I am trying to get the current hour of the day using date: "%H" in a set variables widget. I do the this first on day of month (date: "%d") which works okay, but the hour doesn't ...
3 votes
3 answers
1k views

Swift 2.3 Nearest Hour (Superior or Equal) from current Date

I have to determine H and H+3 where H is >= to nearest Hour. Let me show you some examples : if today's hour is 0h00 -> H = 0h and H+3 = 3h if today's hour is 0h01 -> H = 1h and H+3 = 3h ...
-1 votes
3 answers
53 views

Percetange calculation wrong result

I want to calculate the percentage of a minute from a given number of hours. So let's say I have 2 hours. That's 2*60 minutes. And I want to know how much percent does 1 minute take from 2 hours. The ...
-2 votes
1 answer
71 views

Aggregating to hourly data

I have one time column structured like this 02/01/2003 07:01:42 02/01/2003 07:04:02 02/01/2003 07:36:11 02/01/2003 07:53:09 and an adjacent column with values as integers 2 4 1 1 I want to get ...
0 votes
2 answers
550 views

Pyomo hourly optimization for multiple locations: why are all the output variables equal to zero?

Short Version I'm developing an optimization algorithm to minimize a cost function. Since I want to apply this function to multiple independent locations, the minimization is applied to the sum of the ...
34 votes
4 answers
65k views

How do you set the time and only the time in a calendar in Java?

Having the hours and minutes, is there any easier or better way to set it into a Calendar object than: calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), ...
1 vote
2 answers
71 views

How to add hours matching a mysql query?

Data (Table name: T1): Teacher Subject Day Hour Albert Blue Wednesday 10:00 Albert Blue Wednesday 12:00 Brandon Red Tuesday 09:00 Brandon Red Tuesday 11:00 Albert Cyan Monday 08:30 Albert Cyan ...
0 votes
0 answers
34 views

How add two entered number in hour format or seconds

Hi I want to add two elements in the class in Python with magic method 'add' and 'radd' ,that they show the time, the elements can be entered in two different formats: in seconds or in the hour ...
2 votes
6 answers
14k views

How to convert minutes to days, hours, and minutes?

I am a beginner to Python so I do not know a lot of terms or anything really. Can I ask on how to convert minutes to hours and minutes EX: 75 minutes ->0 days, 1 hour, 15 minutes print("...

1
2 3 4 5
10