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
1 answer

postgresql to_timestamp accepts invalid dates by design

I'm trying to validate strings to timestamps from several CSVs and simply casting them to timestamptz will fail due to the impossibility of forcing an unique datetime format: select '10/31/2010'::timestamp --fail due to "different datestyle" select…
Joe
  • 101
  • 1
  • 7
4
votes
3 answers

Outlook VbaProject.OTM timestamp is not updated upon changing

I have some macros in VbaProject.OTM. Once in a while, I update the code, but the timestamp does not change. I did not check whether the file size changes. This, this and this report similar observations. Is this behavior expected? If not, any…
4
votes
4 answers

Get name of day from timestamp in Android

I have a class that when its initialized, it records the time of initialization in a private field with a public getter: public class TestClass { private long mTimestamp; public TestClass(){ mTimestamp = System.getCurrentMillis(); …
Dumbo
  • 13,555
  • 54
  • 184
  • 288
4
votes
2 answers

How to get android wifi scanresult.timestamp in EPOCH time

How can I get the time for scanresult.timestamp in EPOCH time? It looks like it is returning SystemClock.elapsedRealtimeNanos().
user2763829
  • 793
  • 3
  • 10
  • 20
4
votes
1 answer

Getting current time in seconds/milliseconds with SPARQL?

Is there a way to get the current time in SPARQL as a duration in seconds or milliseconds from some epoch? The standard includes now(), which returns an xsd:dateTime, and a variety of functions for extracting parts of xsd:dateTimes, but nothing for…
Nick Louloudakis
  • 5,856
  • 4
  • 41
  • 54
4
votes
4 answers

Android Convert Central Time to Local Time

I have a MySql database that stores a timestamp for each record I insert. I pull that timestamp into my Android application as a string. My database is located on a server that has a TimeZone of CST. I want to convert that CST timestamp to the…
northdig
  • 479
  • 1
  • 6
  • 18
4
votes
2 answers

Logstash filter timestamp from log message

I have been following the Logstash tutorial and created the following config file for test purposes: input { file { path => "C:\Dev\sample.log" start_position => beginning } } filter{ date { match => [ "logdate", "YYYY-MM-dd…
Jenninha
  • 1,357
  • 2
  • 20
  • 42
4
votes
3 answers

BigQuery / Node.js timestamp way off

Doing a streaming insert into Google BigQuery, from a light Node.js app, using this package: https://www.npmjs.org/package/bigquery I generated a timestamp on my server via this simple line of code: jsonData['createdAt'] = new Date().getTime(); I…
mungojerie
  • 432
  • 7
  • 13
4
votes
5 answers

To get the weekday from TIMESTAMP in hive

I need to calculate mean sales for sunday. Values for the column salesdate(timestamp) are: 2012-01-01 09:00:00 2012-01-01 09:00:00 2012-01-01 09:00:00 ........... I have extracted the date part using to_date().Now how to get weekday(like sunday)…
ashwini
  • 531
  • 5
  • 13
  • 28
4
votes
3 answers

Timestamp discrepancies between SQL server and Java

I need to replicate a simple procedure from Java code to SQL Server stored procedure. It will go into a SQL Azure db in production, but I'm testing it against my local SQL Express 12 install. A part of this stored procedure is to concatenate some…
Andrea
  • 336
  • 2
  • 9
  • 32
4
votes
2 answers

ALTER table column to timestamp now() properties

I created a table in postgres from samples I found on the internet. The definition of the column stored is: stored | timestamp without time zone | default '2014-04-11 21:19:20.144487'::timestamp without time zone How do I alter this to be a…
Shirker
  • 1,233
  • 2
  • 18
  • 30
4
votes
2 answers

Parsing timestamp with timezone in java?

I'm trying to parse a string of format timestamp with timezone obtained from a DB. The String is as follows : SimpleDateFormat mdyFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSZ"); SimpleDateFormat sdf = new…
Karthik
  • 91
  • 3
  • 3
  • 13
4
votes
4 answers

java.lang.NoClassDefFoundError: org/bouncycastle/asn1/ASN1Encodable

I use iText 5.5.0 and BouncyCastle bcprov-jdk15on-1.50 for digitally signing a pdf. It all works fine if I do not include a time stamp in the MakeSignature.signDetached method. When I use the TSAClient specifying the TSAURL, my code gives me the…
user3412670
  • 95
  • 1
  • 2
  • 6
4
votes
2 answers

What does implementation inheritance mean in the javadoc of java.sql.Timestamp?

From the JavaDoc of java.sql.Timestamp class(emphasis mine) Due to the differences between the Timestamp class and the java.util.Date class mentioned above, it is recommended that code not view Timestamp values generically as an instance of…
Geek
  • 26,489
  • 43
  • 149
  • 227
4
votes
1 answer

Postgres Truncate Timestamp Truncate to Decisecond

I have a timestamp column where I track when an external sensor records a reading. This column goes to the microsecond, but I would like to truncate the data to the decisecond for grouping purposes. This truncate function works great, but only…
Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196