Questions tagged [minute]

154 questions
337
votes
21 answers

How to get time difference in minutes in PHP

How to calculate minute difference between two date-times in PHP?
Tom Smykowski
  • 25,487
  • 54
  • 159
  • 236
105
votes
12 answers

How to convert an NSTimeInterval (seconds) into minutes

I've got an amount of seconds that passed from a certain event. It's stored in a NSTimeInterval data type. I want to convert it into minutes and seconds. For example I have: "326.4" seconds and I want to convert it into the following…
Ilya Suzdalnitski
  • 52,598
  • 51
  • 134
  • 168
83
votes
3 answers

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, minute and second for that particular moment.…
mel
  • 831
  • 1
  • 6
  • 6
56
votes
2 answers

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) which expects 2:3:24 or 02:03:24 string. I want to take it a step further and pass the validation even in cases like if you enter just 56, it should be…
user418836
  • 847
  • 3
  • 8
  • 19
33
votes
4 answers

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), …
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
20
votes
1 answer

Python finding difference between two time stamps in minutes

How i can find the difference between two time stamps in minutes . for example:- timestamp1=2016-04-06 21:26:27 timestamp2=2016-04-07 09:06:02 difference = timestamp2-timestamp1 = 700 minutes (approx)
Shubham Jairath
  • 382
  • 1
  • 4
  • 14
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
5
votes
4 answers

Java format hour and min

I need to format my time string such as this: int time = 160; Here's my sample code: public static String formatDuration(String minute) { String formattedMinute = null; SimpleDateFormat sdf = new SimpleDateFormat("mm"); try { …
bEtTy Barnes
  • 195
  • 1
  • 2
  • 10
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
2 answers

PostgreSQL - GROUP BY 10 minutes based in each row

I have a problem difficult to solve, I think you can help. I have a table with millions of records in which precise group every 10 minutes, based on the registry value, for example: Record "01 | 2011/01/03 19:18:00.300" the time it needs to count…
diovanerc
  • 53
  • 1
  • 5
4
votes
3 answers

How to add minutes to datetime64 object in a Pandas Dataframe

I want to add a list of minutes to datetime64 columns into a new df column. I tried using datetime.timedelta(minutes=x) in a for loop. But as a result, it is adding a constant value to all of my rows. How do I resolve this? for x in wait_min: …
Rick707
  • 63
  • 1
  • 5
4
votes
1 answer

How Do I create a countdown timer with minutes and seconds in swift?

I can't find a single tutorial that does countdown timer with minutes and seconds. There's one or two but they are kind of bad. import UIKit class HomeViewController: UIViewController { @IBOutlet weak var focusSession: UILabel! @IBOutlet…
YungGoat
  • 123
  • 1
  • 9
4
votes
5 answers

1-Min Countdown Javascript

I'm attempting to build a typing test that begins counting down when the user presses a key in the text area. I thought an if-else loop would help display and start the 1-minute countdown timer in my HTML but that's not the case. Please explain to…
4
votes
2 answers

Convert TIMEDIFF to hours plus minutes

time1: 2013-08-26 16:33:00 time2: 2013-08-26 15:10:00 $query="UPDATE `FlightSchedule` SET delay = MINUTE(TIMEDIFF(time1, time2)) WHERE `flightNum_arr`='".$flightNum_arr."';"; It saves the value 23 as the delay. Instead the correct answer…
Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217
4
votes
6 answers

How do i change the Android TimePicker minute intervals?

I am writing an application where the user needs to specify a given point in time, but i can't seem to figure out how to set the minute values that the user can choose from, to only use increments of 5 instead of increments of 1. Simply put, when…
JeanBrand
  • 73
  • 1
  • 1
  • 6
1
2 3
10 11