Top "Hour" questions

Extracting hours from a DateTime (SQL Server 2005)

I can extract the month and day by using Day(Date()), Month(Date()). I can't extract hours, with HOUR(Date()). …

sql tsql datetime sql-server-2005 hour
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 …

php date datetime dateadd hour
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_…

java date hour seconds minute
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 …

ios objective-c nsdate hour
Convert time to 24 hours format in Javascript

How can I isolate and convert the local time format in JavaScript's new Date() to a 24 hour format? Example: 2016-09…

javascript datetime time hour
Subtract n hours from a DateTime in Ruby

I have a Ruby DateTime which gets filled from a form. Additionally I have n hours from the form as …

ruby datetime subtraction hour
Regex pattern for HH:MM:SS time string

I want to parse a hh:mm:ss string. A simple one is ([0-1]?\d|2[0-3]):([0-5]?\d):([0-5]?\d) …

regex expression hour seconds minute
How do I add 1 hour to datetime SQL column data?

I used this part of a query to create a table column for the date and time a row is …

sql sql-server datetime getdate hour
Python: get datetime of last hour

I want to get the date time object for last hour. Lets say the sys time is "2011-9-28 06:11:30" I …

python datetime hour
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: …

java date calendar hour minute