Questions tagged [timestamp]

A timestamp is the time at which an event is recorded by a computer system. The timestamp term may also refer to Unix Time or to the timestamp data type.

A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occurred. A timestamp is the time at which an event is recorded by a computer, not the time of the event itself. In many cases, the difference may be inconsequential: the time at which an event is recorded by a timestamp (e.g., entered into a log file) should be very, very close to the time of the occurrence of the event recorded.

In some cases, a timestamp can be just the numbering of events, the use of a date_time format to store a timestamp is then not mandatory.

This data is usually presented in a consistent format, allowing for easy comparison of two different records and tracking progress over time; the practice of recording timestamps in a consistent manner along with the actual data is called timestamping.

Timestamps are typically used for logging events, in which case each event in a log is marked with a timestamp. In filesystems, timestamp may mean the stored date/time of creation or modification of a file.


Examples of timestamps

  • 2005-10-30 T 10:45 UTC
  • 2007-11-09 T 11:20 UTC
  • Sat Jul 23 02:16:57 2005
  • 1256953732

Standardization

ISO 8601 standardizes the representation of dates and times. These standard representations are often used to construct timestamp values.


References

13570 questions
4
votes
3 answers

How to store time created in MySQL table?

I want to store the timestamp which a row was inserted into a MySQL table with the row, to be later compared to other times. What's the best field type for this and what's the best way to insert the row with the timestamp in PHP?
Chetan
  • 46,743
  • 31
  • 106
  • 145
4
votes
1 answer

How to convert an integer timestamp back to UTC datetime?

When syncing between iOS and my Python GAE backend, I would like to utilise the timestamp for a clean solution. According to my research this is the best way to create a reliable…
Houman
  • 64,245
  • 87
  • 278
  • 460
4
votes
2 answers

CryptoAPI's SignerTimeStampEx2 using PInvoke

I'm trying to use CryptoAPI from C# code to add SHA256 timestamps to signed assemblies. Here is the code I'm using: Signer.TimestampSignedAssembly("MyAssembly.exe", "http://tsa.starfieldtech.com"); Signer class: public static class Signer { …
Ruslan Gilmutdinov
  • 1,217
  • 2
  • 9
  • 20
4
votes
1 answer

How to select from SQL table WHERE a TIMESTAMP is a specific Date

Im trying to do a query where a TIMESTAMP field is = to a specific date but my query is not working: The field is type TIMESTAMP(6) which I have only ever worked with DATE / DATETIME fields before. Here is example of a value stored here: 04-OCT-13…
Kairan
  • 5,342
  • 27
  • 65
  • 104
4
votes
1 answer

How to convert Joda DateTime to UTC MySql timestamp

I have a Joda DateTime object representing a UTC time, and wish to store it in a Timestamp field in a MySql table. I have the following code: String ztime = "2013-10-07T08:00:00Z"; DateTimeFormatter parser =…
Dave W
  • 1,061
  • 3
  • 16
  • 29
4
votes
3 answers

Postgresql: how to correctly create timestamp with timezone from timestamp, timezone fields

I have a table with a timestamp without time zone. YYYY-MM-DD HH:MM:SS and a field "timezone" that is either "P" for Pacific or "M" for Mountain. I need to create a field of type "timestamp with time zone" Given the two fields I have, is there a way…
skihansen
  • 83
  • 1
  • 2
  • 8
4
votes
1 answer

Get rid of timestamp in CodeFluent generated source files

CodeFluent includes a comment with a timestamp in all generated .cs files : // CodeFluent Entities generated (http://www.softfluent.com). Date: Thursday, 05 September 2013 14:34. The timestamp is regenerated whether the files changed or not. This…
Marcus Gambit
  • 180
  • 1
  • 9
4
votes
3 answers

Conversion of SAS Macro Variable to time stamp

I am trying to convert SAS Macro variable to timestamp and stumped while conversion. The code which I am using is given below. %let date = '03/15/2013'; %put %sysfunc(inputn(&date,datetime26.6)); Error which I am getting is WARNING: Argument 1 to…
LonelySoul
  • 1,212
  • 5
  • 18
  • 45
4
votes
2 answers

Find rare events in flowing window on timestamp

Given the following table: CREATE TABLE table ( "id" serial NOT NULL, "timestamp" timestamp without time zone NOT NULL, "count" integer NOT NULL DEFAULT 0 ) I am searching for "rare events". A rare event is a row that owns the following…
Ronk
  • 53
  • 3
4
votes
1 answer

SimpleDateFormat to Timestamp loses precision with getTime() method

I've got a method to parse a String (yyyy-MM-dd HH:mm:ss.SSS) to a Date object using SimpleDateFormat. public static Timestamp convertToTimestamp(String stringToFormat) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd…
deanmau5
  • 861
  • 7
  • 17
  • 27
4
votes
5 answers

how to convert date and time to timestamp in php?

i have a date '07/23/2009' and a time '18:11' and i want to get a timestamp out of it : here is my example: date_default_timezone_set('UTC'); $d = str_replace('/', ', ', '07/23/2009'); $t = str_replace(':', ', ', '18:11'); $date = $t.', 0,…
Patrioticcow
  • 26,422
  • 75
  • 217
  • 337
4
votes
3 answers

How to find difference b/w TIMESTAMP format values in Oracle?

I have two timestamp columns: arrTime and depTime. I need to find the number of munites the bus is late. I tried the following: SELECT RouteDate, round((arrTime-depTime)*1440,2) time_difference FROM ... I get the following error: inconsistent…
Buras
  • 3,069
  • 28
  • 79
  • 126
4
votes
0 answers

Default timestamp attribute in coredata?

I want to know when a certain object was added to CoreData. Is there a default timestamp or lastModified attribute in CoreData that I can access? If yes, how can I do that.
4
votes
1 answer

Convert unix timestamp column to day of week in R

I am working with a data frame in R labeled "mydata". The first column, labled "ts" contains unix timestamp fields. I'd like to convert these fields to days of the week. I've tried using strptime and POSIXct functions but I'm not sure how to execute…
pas
  • 53
  • 1
  • 5
4
votes
1 answer

Select ISO 8601 Timestamp from MySQL Database

I am currently using PHP/MySQL and the jQuery timeago plugin. Basically, I need to pull my timestamp from the database and convert it to ISO 8601 format. Like this 2008-07-17T09:24:17Z Currently, my timestamps are in the database in this…
Dodinas
  • 6,705
  • 22
  • 76
  • 108
1 2 3
99
100