Questions tagged [hour]

457 questions
3
votes
2 answers

Problem selecting date in UIDatePicker iphone

I´m using the UIDatePicker in a form but the problem is that when I select the date and time, the time in the text field is 5 hours after the time showed in the picker. I've read that there's a bug in date picker but I don't know how to solve this.…
Rafael Jimeno
  • 626
  • 2
  • 8
  • 20
3
votes
3 answers

Select data from the last hour, MS Access

I am working on doing some data transfers moving data from one database to another and I would like to do this without using to much memory on the computer that I am running this data transfer program on. Currently the program is ran every minute,…
LaDante Riley
  • 521
  • 4
  • 14
  • 26
3
votes
4 answers

How to convert hours in minutes in javascript HH:MM to MM?

I want to convert HH:MM to MM I want to use minutes in below code but It can't convert 14:30 to 858 as you can see result here in fiddle minutes but it converts 14.3 to minutes if you put 14.3 in fiddle code instead of 14.30. I am converting hrs. in…
Aryan
  • 3,338
  • 4
  • 18
  • 43
3
votes
4 answers

How to get the hour and the nearest hour?

How do you get the current hour and the nearest hour, e.g. The time is now 2:25PM. The current hour is 2:00PM The nearest hour to be 2:59PM (not 3PM, as 2:59PM will do).
MacMac
  • 34,294
  • 55
  • 151
  • 222
3
votes
3 answers

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 if today's hour is 21h00 -> H = 21h and H+3 = 0h if today's…
user7219266
3
votes
3 answers

Calculate Avg Time in R

My Dataframe called copy1: copy1 Source: local data frame [4 x 4] Groups: GM [2] GM Avg.Start.Time Avg.Close.Time Avg.Last.Task.Duration (fctr) (fctr) (fctr) (int) 1 ED 13:15 16:16 …
Shery
  • 1,808
  • 5
  • 27
  • 51
3
votes
1 answer

R convert dataframe string column to datetime with one-digit length hour

How can I convert a "string" dataframe column attr_date into datetime when my hour can be one digit length too (eg.: 2012.01.01 9:00:00)? The following code returns only with the date part without time part: df[['attr_date']] <-…
ragesz
  • 9,009
  • 20
  • 71
  • 88
3
votes
3 answers

Problem using JPA with Oracle and grouping by hour

I have a problem using JPA with Oracle and grouping by hour. Here's the scenario: I have an entiry named EventData. This entity has a java.util.Date field named startOfPeriod. This field maps in a table field of datatype DATE. The query I'm using is…
Berne
  • 617
  • 1
  • 7
  • 17
3
votes
1 answer

SWIFT 2.2 Minimum and maximum HOUR in DatePicker

I'm trying to set maximum and minimum hour in my Datepicker. I managed to set minimum, but cannot resolve maximum. Here is what I have so far: let startHour: Int = 8 let endHour: Int = 22 let date1: NSDate = NSDate() let gregorian:…
3
votes
1 answer

Using cell values according to the time of the day

I need to create a spreadsheet that should pull data from a cell according to the time of the day. In the column "A" I have all the hours of the day, ranging from 0 to 23; in the column "F", I have series of arbitrary numbers related to a use…
cgobbet
  • 309
  • 4
  • 12
3
votes
1 answer

jQuery/PHP: Refresh page according to server time

I'm trying to make a jQuery script for reloading the complete page. This is the code I got so far; This works…
zorensen
  • 334
  • 4
  • 19
3
votes
2 answers

Ask Gregorian Calendar for hour of day in java

I'm using a Gregorian Calendar to set a specific date and time to an application using the set function of the Gregorian Calendar. When i use the getTime() method, it gives me the right output however when i try to access the Hour_Of_Day and Minute…
Leanne C
  • 51
  • 1
  • 1
  • 5
3
votes
2 answers

Mean of time - hh:mm:ss - group by a variable

Need to calculate the mean of Time by Country. Time is a Date variable - hh:mm:ss. This command with(df,tapply(as.numeric(times(df$Time)),Country,mean)) is not returning the correct mean in hh:mm:ss. Country Time 1 Germany 2:26:21 2 Germany…
Oriol Prat
  • 1,017
  • 1
  • 11
  • 19
3
votes
2 answers

Data structure for Rush Hour solver taboo list

I'm using Breadth First Search to solve a rush hour game. It works fine, but it takes really long on difficult boards. I am using a taboo list to avoid states I already discovered, to avoid insane memory usage and improve the run time. I think this…
Wouter Florijn
  • 2,711
  • 2
  • 23
  • 38
3
votes
2 answers

.Net - Time of the day

I am working on an application that needs to set rules for periods of time. The company has different branches, each branch can set its own rules (i.e a branch starts work at 8.30 am, ends work at 17.30 pm, with 30 minutes pause for lunch; another…
Hoppers13
  • 245
  • 2
  • 7