If I have a datetime value of something like 1/10/2011 9:00:00, how do I get the 9:00 am from that datetime?
If I have a datetime value of something like 1/10/2011 9:00:00, how do I get the 9:00 am from that datetime?
I needed 24 hour time e.g. 11pm would return "23" (not 11)
Time.current.strftime("%H")
=> "18"