Splunk convert time to epoch. Since Splunk uses 32-bit epoch time, events after 2038 cannot be indexed. Splunk convert time to epoch

 
 Since Splunk uses 32-bit epoch time, events after 2038 cannot be indexedSplunk convert time to epoch  | eval epoch1 = _time

Is there a way to fix this so that Splunk understands the 18 characters? The source for the dashboard is the following:The problem is that you are setting earliest_time and latest_time - but Splunk does not know how to relate that to the _time field that you have defined in your lookup table. The idea is that a user clicks on a field in a table row result, and the click opens a new tab to a separate dashboard w. Solved: I have a conversion set up to change the epoch time | convert ctime(_time) as date time . If you want to do it in JS use something like var epoch = Math. By adding a % before the Z, Splunk will not perform this adjustment, which unless you have your timezone set as GMT you dont want (this assumes its ACTUALLY zulu time). Once that works, then this should do the math to convert _time to milliseconds, add the uploadTime, and convert the total time. We will discuss how to change time from human readable form to epoch and from epoch time to human readable. I have a file that I am monitoring has time in epoch format milliseconds . This count starts at the Unix Epoch on January 1st, 1970 at UTC. When converting string time to epoch, hour and minute part is mandatory, date part is optional (default to today). COVID-19 Response SplunkBase Developers Documentation. 2013-05-03 12:23:34 to epoch (which is the time expressed as the number of seconds since midnight Jan 1, 1970). You will need a lookup table to interpret TIMEZONE as SPL does not provide such meta data. How to convert epoch time with milliseconds into splunk at indexing time vrmandadi. Unfortunately, Splunk is not recognising the date when it gets indexed, so the "_time" field is when the data was indexed. Read our Community Blog > Sitemap. Splunk, Splunk>, Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or. Playlist Link for All Daily Trainings. _time is always stored in the Splunk indexes as an epoch time value. For example the UNIX epoch time 1484993700 is equal to Tue Jan 21 10:15:00 2020. Read more about strptime(). For more information about how the Splunk software determines a time zone and the tz database, see Specify time zones for timestamps in Getting Data In. Don't use time formatting functions as they will take account of your time zone, but it's simple to do the. The rt field is a epoch computer time format. "%+" is often a good quick format modifier for getting a readable timestamp. Is there a way to use the props. You need, then, to massage the string a bit before passing it to. I want to convert my default _time field to UNIX/Epoch time and have it in a different field. . Builder ‎03-26-2020 09:26 AM. It'll only work if i am in the same timezone as the server, which is fine for me but not usually the case with others, and then the rest of the lines re-apply the timezone to double it. Splunk, Splunk>, Turn Data Into. Description This function takes no arguments and returns the time that the search was started. 0 Karma Reply. It's a Splunk SOAR (formerly Phantom) forum. BrowseDashboards & Visualizations. 2 admin apache audit audittrail authentication Cisco Diagnostics failed logon Firewall IIS index indexes internal license License usage Linux linux audit Login Logon malware Network Perfmon Performance qualys REST Security sourcetype splunk splunkd splunk on splunk Tenable Tenable Security Center troubleshoot troubleshooting tstats. For example the UNIX epoch time 1484993700 is equal to Tue Jan 21 10:15:00 2020 . | eval humanTime = strftime(_time/1000, "%c")@goyals05, I hope the above example is timestamp is String Time and not Epoch Time. somesoni2. strptime() will convert strings to epoch times| eval _time=strptime(time,"%a, %d %b %Y %H:%M:%S %Z")Splunk Search: Convert Millseconds to Epoch Time; Options. . ; If this is supposed to be the _time field, then make sure to update the. So I've been looking at the Splunk documentation here and. . 2. I'm running the below query to find out when was the last time an index checked in. Splunk, Splunk>, Turn Data Into Doing. Try any of strptime or convert command. UNIX time appears as a series of numbers, for example 1518632124. I tried all the options and unable to see date in human readable format. 02-12-2020 11:41 PM. I am looking to format my current time to epoch time (as we need to calculate some math function on time) Time format for incidentEndTimeStr looks like this: 4/11/16 2:52 And used the eval command and strptime function below to change the format, but it doesn't work. Short-hand to convert python date/datetime to Epoch (without microseconds) Use strptime to parse the time, and call time () on it to get the Unix timestamp. timestamp() print(ts) Output: 1575158400. 04-07-2023 12:56 PM. If unspecified, Splunk assumes it is the same time zone as the Splunk indexer. This solution doesn't appear to account for timezone, which Splunk automatically adjusts for. When reporting, it will then display and normalize times to the time zone of the Splunk server. conf to convert these all to the timestamp for the events? An example of the first couple fields in the event are: rec_type=500 rec_type_simple="FILELOG EVENT" event_sec=1453991513. Use time modifiers to customize the time range of a search or change the format of the timestamps in the search results. It is not showing any value in the human readable time column. , the indexer is running on UTC but the source machines are running EST (-5), Splunk will interpret "Wed 2021 May 28, 16:58:11:430" as 1622246291. It is not showing any value in the human readable time column. I can reproduce proper results with any date in 1971 or newer, but none in 1970. When an event is processed by Splunk software, its timestamp is saved as the default field _time. First you need to extract the time to upload as a field. Time on Stack" EXAMPLE before adding the strftime syntax: Day DOW Call Volume actual_stack_time1 handling_time1Time modifiers. In my data EMPTY_DATE looks like this: 2020-08-27 00:00:00. Solved: I have an event field called `LastBootUpTime=20120119121719. Mark as New; Bookmark Message; Subscribe to Message; Mute Message;. Usage The now () function is often used with other data and time functions. If it is string time stamp i. conf. . However final result displayed will be based on Splunk Server time or User Settings. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. The strptime function doesn't work with timestamps that consist of only a month and year. Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction. Description: Convert a human readable time string to an epoch time. Convert NT Epoch Time with props. It also assumes that you want to see this human readable time value in the current time zone of the user account that is currently logged in. Community; Community; Splunk Answers. ) Let's call this table timezone. 04-07-2023 12:56 PM. Unix time (also known as Epoch time, POSIX time,seconds since the Epoch,or UNIX Epoch time) is a system for describing a point in time. Thanks. For example, both of these are the same: Epoch = 1511324473 iso8601 = 2017-11-22T04:21:13Z. | makeresults | eval message= "Happy Splunking!!!" This sounds easy but I can't seem to figure it out. In my index, I have a field that has been extracted for a "last checkin time". 1, the method will be |eval pretty_time=tostring (num_seconds, "duration") where num_seconds is an integer quantity of seconds or a decimal quantity of seconds and sub-seconds. Hi, I wonder whether someone could help me please. 89 mktime – Convert human readable time format epoch time format. struct_time does not support sub-second precision. I have created the following search. I have a file that I am monitoring has time in epoch format milliseconds . I have events that are coming in with no timestamp except for a field "event_sec" which gives me the time in epoch format. Answer. 0 Regards ShraddhaHi I have a timestamp field with values as below "2016-08-25T13:30:36. How to convert epoch time with milliseconds into splunk at indexing time vrmandadi. conf to convert it to human readable. . 01-09-2014 07:28 AM. Delta will compute the difference between nearby results using the value of a specific numeric field. conf to convert these all to the timestamp for the events? An example of the first couple fields in the event are: rec_type=500 rec_type_simple="FILELOG EVENT" event_sec=1453991513. Description This function takes no arguments and returns the time that the search was started. 03-02-2016 10:59 AM. Solution. Convert timepicker token to epoch time for eval, regardless of timepicker combination. Engager ‎03. You use date and time variables to specify the format that matches string. The timestamps must include a day. I have unix time format on my log and wants to convert to human readable, the method using for epoch time didn't work for me. time. 0 coins. You can use a wildcard ( * ) character to specify all fields. A. 405Z into a Splunk time format so I can get time windows to use in streamstats. I can't write condition _time<30d@d - that is the reason. . Hello Splunk Practitioners!In June, Splunk Customer Success introduced Product Adoption Boards -. 0. I have a time in the format of: 3:21:34 AM 12/8/2014 I'm trying to convert this to epoch time. If the week containing January 1st has four or more days in the new year, it is considered week 1. The current time now () is already epoch so you just need to convert (at least during calculation of different) createdate field to epoch. 1 Karma. Any epoch time can be used. Splunk will convert earliest and latest timestamps in epoch format internally. Hai, i have updated the search but not getting new filelds created. Background. Solved: Hi All, I want to convert the following into Epoch time ,but it is not getting resolved. Converting timestamp to date? MichaelCohen821. COVID-19 Response SplunkBase Developers Documentation. | makeresults | eval message= "Happy Splunking!!!"HI @Becherer,. If Splunk has read your timestamp (without the year) and parsed and indexed it correctly (you can compare the the timestamps in the events with the timestamp next to the blue down-arrow-thingy to the left of the event), then you can skip the first part and use the _time field, which is already in epoch. New Member. Splunk, Splunk>, Turn Data Into Doing, Data-to-Everything, and. I'd like to convert it to a standard month/day/year format. 151:69280424)" Tags (1) Tags: splunk-enterprise. Used in calculating the day of the year. I also don't want to start new search for just parsing timestamps (it has to be fast). This has converted the times. To compare timestamps they must first be converted to epoch (integer) form. You can use a wildcard ( * ) character to specify all fields. In my splunk search for getting the date of Nessus plugins feed version used in a scan I get the number returned in the orginal format used of year-month-date-time (for example November 7th 2023 at 1200 would display as 202311071200) that I would like to convert into a readable format that I can then manipluate in splunk such as if i want to get the. So I have two date fields - Date_Created & Acknowledge_Date both in the format YYYY-MM-DD HH:MM:SS. US Pacific Daylight Time, the timezone where Splunk Headquarters is located. 04-26-2016 12:07 PM. 07-30-2010 09:53 PM. You can convert String Time in your old format to Epoch Time in new format using strptime() and then convert to string time of your new format using strftime(). You can specify the time format by timeformat argument. Splunk Search: How to convert time to epoch time? Options. Using %s to parse the epoch time ( in miliseconds) gives a gibberish date. Epoch, also known as Unix timestamps, is the number of. | eval humanTime = strftime(_time/1000, "%c") 09-04-2021 01:48 AM. 7 Python 2. Also that the time fields are not the ones that Splunk turns into _time or that we want to catch them before Splunk applies its own time conversion functions to the field. By adding a % before the Z, Splunk will not perform this adjustment, which unless you have your timezone set as GMT you dont want (this assumes its ACTUALLY zulu time). _time is the epoch time or the number of seconds from Midnight January 1 1970 UTC. If you want to see the actual epoch time value, you can use eval to create an epoch time representation instead: | eval time_epoch = strftime (_time, "%s") As @mdsnmss suggested, you could also do. import datetime ts = datetime. Hi Folks, I am been trying to display latest time results. splunk-enterprise. What is the splunk query to convert java date format to yyyy-MM-dd. 1540108800 = 8 AM on Sunday, 1540170000 = 1 AM on Monday. Premium Powerups Explore Gaming. Use timeformat option to specify exact format to convert from. So. Subscribe to RSS Feed; Mark Topic as New; Mark Topic as Read;. addSeconds('1970-01-01T00:00:00Z', 1675667443)-----I think you may have found a bug. 04-26-2016 12:07 PM. Splunk, Splunk>, Turn Data Into Doing, Data-to. 2. conf to convert these all to the timestamp for the events? An example of the first couple fields in the event are: rec_type=500 rec_type_simple="FILELOG EVENT" event_sec=1453991513. One is not limited to using now() in relative_time. Browse . If it is not working, try dividing the number by 1000 first. This is how the Time field looks now. One way to determine the time difference between two time zones is to take any date and treat is as a UTC time stamp and as an EST one and subtract their corresponding epoch times. That is, we're converting a epoch time into a string. The time shown is GMT and I need to use this field when using a dashboard to accurately show data. what i have so far which let converts it in a readable format. COVID-19 Response SplunkBase Developers Documentation. The general workflow for creating a CSV lookup in Splunk Web is to upload a file, share the lookup table file, and then create the lookup definition from the lookup table file. How to convert Zulu time format to Epoch using strptime? Get Updates on the Splunk Community! 🌟 All Levels Launched in the Great Resilience Quest! 🌟By contrast, the start of Unix epoch time is unambiguously UTC. This is reviving a very old thread, but I will still post this in case someone else needs it. conf to convert it to human readable. I suggest you change your Splunk preferences to display time in UTC so you see the true time of the event. Description. I am looking to format my current time to epoch time (as we need to calculate some math function on time) Time format for incidentEndTimeStr looks like this: 4/11/16. I want to convert my default _time field to UNIX/Epoch time and have it in a different field. NFL. Currently I have this host ="10. "Have problems" is not a question. This timestamp, which is the time when the event occurred, is saved in UNIX time. SSS (minutes, seconds, and subseconds) to a number in seconds. When you then format them for display they'll be in your selected time zone. 08-15-2016 10:23 AM. 2. convert unix time to human readable time. SplunkTrust. Description. If you want to return the UNIX time when each result is returned, use the time () function instead. (Assuming your date format is in that type of time stamp). @splunk_enjoyer You need to state your question clearly. BrowseCOVID-19 Response SplunkBase Developers Documentation. Convert Date to Day of Week. "h") as it will convert offset to a 4 digit TZ offset (in my case +1100) and append h, so will do a relative_time addition of 1100 hours to my time, whereas it should be +11h. Splunk Answers. I've made a deep search and tried with convert, rename and eval functions but none of them are working for me (at least the way I'm using them). How do I perform this conversion from microseconds to a time unit in Splunk?HI @Becherer,. Once that works, then this should do the math to convert _time to milliseconds, add the uploadTime, and convert the total time. if you are wanting to extract month from event time, Splunk already does this for you by storing the month in date_month field. 040875200Z" to epoch time for calculating difference and then to readable. Options. When used on the _time field it returns the difference in seconds. Solution. _time is always stored in the Splunk indexes as an epoch time value. 05-09-2014 02:03 PM. But what I struggle now is to convert the timeStamp -string to date format to get at the end the min (timeStamp) extracted in order to compute the difference between the event's _time and the min (timeStamp) by the id field. SplunkTrust. You can specify the time format by timeforma t argument. This timestamp, which is the time when the event occurred, is saved in UNIX time. For example, the result of the following function is 1001 : eval result = tostring (9, "binary") This is because the binary representation of 9 is 1001 . mstime () Syntax: mstime (<wc-field>) Description: Convert a [MM:]SS. _time is always in Unix epoch time. Since your data is already indexed with the timestring in epoch seconds the easiest way to convert it would be to use the IFX field picker. Kindly help| fields Day DOW "Call Volume" "Avg. 3, many of the form inputs can be extended to set / unset / eval tokens based on other tokens or their new values. COVID-19 Response SplunkBase Developers Documentation. To convert the start time to a text form use strftime. I have found a number of solutions in these forums, but I cannot seem to get. I want to convert them to human readable format for some arbitrary timezone other than UTC. . In general what you want to do is take the separate fields, combine them into one field, and then use a conversion function to parse the represented time into epoch format and store that as _time. Assuming you dont need to do the hyph. Converters. Use time modifiers to customize the time range of a search or change the format of the timestamps in the search results. Is it possible to convert the "rt" field to a user-friendly format? I searched through some of the other questions but none really addressed this specific question. ). Advertisement Coins. It's almost time for Splunk’s user conference . Thanks. 08-26-2010 01:56 PM. Hi, I wonder whether someone may be able to help me please. In cases where you have to forward data, you must configure a heavy forwarder to handle these changes. The time returned by the now () function is represented in UNIX time, or in seconds since Epoch time. You use date and time variables to specify the format that matches string. Also that the time fields are not the ones that Splunk turns into _time or that we want to catch them before Splunk applies its own time conversion functions to the field. conf. Use the eval command with mathematical functions. It wasnt playing when I was trying to do it. Subscribe to RSS Feed; Mark Topic as New; Mark Topic as Read; Float this Topic for Current User;. I am looking to pass the a time range (-5m and +5m) relative to a row's _time value to another dashboard through the use of a drilldown but am having trouble getting this to work. With older versions of GNU date, you can calculate the relative difference to the UTC epoch: date -d '1970-01-01 UTC + 1234567890 seconds' If you need portability, you're out of luck. Solved: Hi, i need to write a query that converts time format from minutes to format Xh Xmin Xs my query | eval finish_time_epoch =Seems like your search results include the _time field which shows human-readable format in Splunk visualizations (it's a special field) but holds an epoch value. logStart value to epoch time, or would Splunk ever take the generated time field in the json root element?Splunk Convert Epoch milliseconds to Human Readable Date formatting issue. Ways to Use the eval Command in Splunk. Any help is appreciated. This should be used in day today basis and how to convert timestamp in to date, month and year. Epoch and unix timestamp converter for developers. g. Use the strptime function to convert a date/time to epoch form. This has converted the times to epoch. Considering converting from epoch is one of the most common Splunk questions of all time, considering this page has 46k views, and considering that each and every answer is entirely incorrect (and the actual question itself is misleading) this page is desperately in need of removal. It also assumes that you want to see this human readable time value in the current time zone of the user account. So I've been looking at the Splunk documentation here and. Try this to convert time in MM:SS. , mm/dd/yyyy hr:min:sec? I have tried to convert them to datetime. If you leave that field name alone, it will "magically" convert it to human readable for you. This is an alternative option of strptime() function in eval functions. 01-09-2014 07:28 AM. In this tutorial we are going to see about date and time format, how we can strip out a part of timestamp like yea. This topic lists the variables that you can use to define time formats in the evaluation functions, strftime () and strptime (). That shows the desired five but there might be a better way. Is it possible to convert the "rt" field to a user-friendly format? I searched through some of the other questions but none really addressed this specific question. New Member ‎04-03-2019 08:45 AM. How to convert epoch time with milliseconds into splunk at indexing time. This solution doesn't appear to account for timezone, which Splunk automatically adjusts for. 1) The question doesn't actually provide a. SSS format to seconds. converts a human readable date into an epoch/unix timestamp. D. This works for me: | eval time = strftime(time, "%c")The answer lies in the difference between convert and eval, rather than between mktime () and strptime (). Handling Time" "Avg. Hi @Mus, thank you once more for taking the time to help me. However, in this case the format is not valid: $ date -d"08 18 2016 09:18:25" "+%s" date: invalid date ‘08 18 2016 09:18:25’. Splunk’s relative_time function takes in a value of start time and duration and returns a relative time value of time in epoch. Would it help to convert the message. This gives Splunk enough information to assign the correct time to the event, but also allows us to run queries. Hope this helps, d. conf to convert it to human readable. 0 Karma. The first works fine , but getting it to use this for the event timestamp not. One way would be to make use of the strptime()/strftime() functions of eval, which will let you convert time from strings, e. Second, check if the field extraction for shutdown_date and shutdown_time is not adding additional spaces in the values, though they won't be visible in the table visualization in Splunk but will mess up your time. For example, the relative time 2 hours from a start time of 2:00 PM would be 12:00 PM. I have a file that I am monitoring has time in epoch format milliseconds . Although the above search would only work if your time field is in Epoch time format, the handy thing about it Epoch time is that when sorting after using the fieldformat function, the time is only presented to the user in human readable format. conf23! This event is being held at the Venetian Hotel in Las. _time is always stored in the Splunk indexes as an epoch time value. You can follow this document to set up a lookup: Use lookups in Splunk Web; per Define a CSV lookup in Splunk Web: CSV lookups are best for small sets of data. 125000-360&#39; I am trying to convert this to a more readable format by using. Hello Splunk Community. g. You can try strptime time specifiers and add a timezone (%z is for timezone as HourMinute format HHMM for example -0500 is for US Eastern Standard Time and %Z for timezone acronym for example EST is for US Eastern Standard Time. Deployment Architecture; Getting Data In;. As i couldn't able to work with 13 Digits and when i changed form 13 Digits to 10 Digits it worked out well for me. I'd like to convert it to a standard month/day/year format. I'm just not seeing the benefit to using an ISO string. Literally speaking the epoch is Unix time 0 (midnight 1/1/1970), but 'epoch' is often used as a synonym for Unix time. This should get documented in Functions for Eval and Where. | eval newdatefield = strftimeCOVID-19 Response SplunkBase Developers Documentation. The base for excel date time is 1/1/1900 and for epoch is 1/1/1970, the 25569 is the adjustment of dates (for 70 years). Therefore, since you can generate timestamps in UTC, your best bet would be to have earliest and latest in epoch as well. 82" "2016-08-25T13:13:38. This moment in time is sometimes referred to as epoch time. This will parse your string and creates _time which will be shown human readable in Splunk, and epoch as an epoch time. This is my search and the result of my. . Date and time function syntax reference for various programming languages. 11-08-2019 04:55 AM. For example, if you create a field call time, convert user selection to epoch using <change> event/drilldown for time. To be able to find the difference, both timestamp should be in epoch format. You can use a wildcard ( * ) character to. The generalized assumption in this question is that the formats cannot be known in advance or are too many to configure manually. It will emit HH:MM:SS or DD+HH:MM:SS if over a day. Aug 8, 2019 at 23:48. BrowseYes, Splunk and the source server may be in the same TZ, but epoch is always in UTC, which is why I figured that you may be in central Europe. 06-06-2017 09:20 AM. 281Z which I'm trying to convert to an epoch time. Can somebody give me some guidance on how to correct this please? Tags (4)Splunk Cloud Platform; Splunk Data Stream Processor; Splunk Data Fabric Search; Splunk Premium Solutions; Security Premium Solutions; IT Ops Premium Solutions; Engineering Premium Solutions; Apps and Add-ons; All Apps and Add-ons; Discussions. Few examples below 7/24/2020 9:45:47 AM +05:30 7/23/2020 6:29:45 AM -05:00 7/24/2020 11:21:31 AM +07:00 7/24/2020 4:21:29 AM +00:00 I would like to find the differe. Since your data is already indexed with the timestring in epoch seconds the easiest way to convert it would be to use the IFX field picker. Note- The 'timestamp' ODATE is not the actual timestamp. To convert time strings from one format to another you must strptime() convert to epoch form and then use strftime(). (Read Splunk Documentation and understand the difference between strptime() i. It'll only work if i am in the same timezone as the server, which is fine for me but not usually the case with others, and then the rest of the lines re-apply the timezone to double it. 2 Karma. You can always use the shortcut _time to convert timestamp out of epoch time. The string you illustrated looks like some combination of 4-digit year followed by some representation of month, day, hour, etc. When exported as csv, it's original epoch value can be seen. I now have an average time it takes to acknowledge an incident in epoch format. I'd like to convert it to a standard month/day/year format. Splunk Search: convert date time to epoch time for sorting; Options. . I would like to take a large epoch time (8492963) and convert it into Days:Hours:Minutes:Seconds (for example 98:07:09:23). I have a CSV file uploaded via "lookup Editor" and my "Scan Date" column has the following time format: I want Splunk to recognize this time format for me to tell it to display everything older than 7 days from now. Deployment Architecture; Getting Data In; Installation;. In my index, I have a field that has been extracted for a "last checkin time". 0. Solved: How to convert the date and time in the below format to epoch time? 201303140216 yyyymmddHHMM here hour and minute is in 12 hours clock, so. 1700816750 Convert epoch to human-readable date and vice versa Tim e stamp to Human date [batch convert] Supports Unix timestamps in seconds,. The time field has a bunch of different formats. I also don't want to start new search for just parsing timestamps (it has to be fast). Training + Certification Discussions. What setting should be placed in the props. however when I extract it using strftime(), it shows the time in PST (my local time) whereas the original time showed in Splunk events (i. I have this date string example: Mon, 01 May 2023 00:00:00 GMT how can I convert it to epoch? thanks!On Splunk Enterprise instances, if you need to modify timestamp extraction, specify the configuration on the indexers. I have a need to compare a timestamp of a log to an EPOCH time also on the same log line and show the DiffCOVID-19 Response SplunkBase Developers Documentation. Hey Sorry but I checked the values and it should convert to 00:01:18 and 00:07:58, check here opens a subsearch; you need square brackets around it. This works with the query above. Subscribe to RSS Feed; Mark Topic as New; Mark Topic as Read; Float this Topic for Current User;. that gives you seconds, then you do with that as you want. I am trying to change Event time Apr 02, 2019 3:15:34 AM to YYYY-MM-DD HH:MM:SS,sss format. g. Splunk Administration; Deployment Architecturein the example, Splunk interprets the _time_AEST variable as seconds since epoch (1970-01-01 00:00:00 UTC), and so technically Splunk is interpreting this as a different 'real world' time -- if you attempt to print the timezone of the date, it will incorrectly report the users configured timezone. Considering converting from epoch is one of the most common Splunk questions of all time, considering this page has 46k views, and considering that each and every answer is entirely incorrect (and the actual question itself is misleading) this page is desperately in need of removal. Then you can calculate the difference between your timestamps in seconds (your B-A). Go to to suggest one or to up-vote someone else's idea.