Questions tagged [seconds]

333 questions
15
votes
2 answers

In JavaScript how to get second of current day?

So the question is described in title. I need to get current second of the day using JavaScript.
Kirill Titov
  • 2,060
  • 5
  • 21
  • 33
14
votes
5 answers

How to get time difference between two timestamps in seconds with jQuery?

I want to display x seconds ago based on a MySQL Timestamp. I found the plugin called timeago But I cannot find a way to make it display only seconds. I'm OK with 61 seconds, or 300 seconds. Any way to convert the output to seconds with timeago, or…
jeff
  • 13,055
  • 29
  • 78
  • 136
13
votes
7 answers

How to get the current UTC time in seconds

I have an application, which needs to compare the time in seconds. I want to know how to get the current UTC time in seconds. Can some one post an example of it how can we do this in Java?
swati
  • 2,099
  • 6
  • 19
  • 23
13
votes
1 answer

pandas remove seconds from datetime index

I have a pandas dataFrame called 'df' as follows value 2015-09-27 03:58:30 1.0 2015-09-27 03:59:30 1.0 2015-09-27 04:00:30 1.0 2015-09-27 04:01:30 1.0 I just want to strip out the seconds to get this …
Runner Bean
  • 4,895
  • 12
  • 40
  • 60
12
votes
3 answers

Number of seconds since the beginning of the day UTC timezone

How do I find "number of seconds since the beginning of the day UTC timezone" in Python? I looked at the docs and didn't understand how to get this using datetime.timedelta.
daydreamer
  • 87,243
  • 191
  • 450
  • 722
11
votes
1 answer

Get chrono seconds in float

In the example at http://en.cppreference.com/w/cpp/chrono the seconds value is obtained in a double. This is the behavior I want. However, this appears to rely on the implicit assumption that the time point subtraction yields a value that represents…
taz
  • 1,506
  • 3
  • 15
  • 26
11
votes
4 answers

Convert seconds to Days, Minutes and Seconds

I've been set the 'challenge' of converting seconds to format as the Days,Minutes and Seconds. For example: 31600000 = 365 days, 46 minutes, 40 seconds. using namespace std; const int hours_in_day = 24; const int mins_in_hour = 60; const int…
Dan
  • 149
  • 1
  • 2
  • 7
10
votes
3 answers

Get number of seconds since

I am writing an application in C#, and I would love to know how you can get the number of seconds in each month. For example, today, February the 3th, I would love to have: January: 2678400 February: 264000 Basically, I would love to know how many…
Job
  • 101
  • 1
  • 1
  • 3
10
votes
2 answers

php - How To Convert 1 day To Seconds

I am creating a form to set publish interval and want to sum all of the submitted values into seconds. The form consist of fields to determine seconds, minutes, hours, day and so on. I am collecting the submitted values to string by giving date…
Ari
  • 4,643
  • 5
  • 36
  • 52
10
votes
4 answers

Timer Interval 1000 != 1 second?

I have a label which should show the seconds of my timer (or in other word I have a variable to which is added 1 every interval of the timer). The interval of my timer is set to 1000, so the label should update itself every second (and should also…
Tim Kathete Stadler
  • 1,067
  • 4
  • 26
  • 52
9
votes
3 answers

T-SQL Format seconds as HH:MM:SS time

Is there any tricky way to format seconds like hours:minutes:seconds. For example, 3660 seconds will be displayed as 01h 01m 00s or 01:01:00 I am aware of the standard way of doing this: Divide all seconds on 3600 to get the hours Divide the…
gotqn
  • 42,737
  • 46
  • 157
  • 243
8
votes
2 answers

Retrieve two equal dates from SimpleDateFormat in java

I made this snippet to show my problem: import java.text.SimpleDateFormat; public class Foo { public static void main(String[] args) { SimpleDateFormat formatter = new SimpleDateFormat("mm hh dd MM yyyy"); String date1 =…
OiRc
  • 1,602
  • 4
  • 21
  • 60
8
votes
0 answers

Convert Seconds to datetime timedelta

In python how can I simply convert an integer of seconds into (h:m:s) using the datetime module? i.e. 500000 ---> 138:53:20 Please, no tuple hackery.
user3814630
  • 167
  • 1
  • 2
  • 4
8
votes
4 answers

Lat Long to Minutes and Seconds?

Google Maps gives me the Lat and Long of a location in decimal notation like this: 38.203655,-76.113281 How do I convert those to Coords (Degrees, Minutes , Seconds)
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
7
votes
3 answers

How to make an horizontal progress bar depend on seconds in Android?

I want to know how to make an horizontal progress bar depend on seconds. For example, what code I have to write to the progress bar start in 0% at 0 seconds and reach 100% after 60 seconds? Resuming I want to make an horizontal progress bar that…
Ricardo
  • 121
  • 1
  • 2
  • 11
1
2
3
22 23