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

Is CURRENT_TIMESTAMP a function in ANSI SQL?

I was using the bigquery function current_timestamp() when i discovered that you can use it without parenthesis if you want. Since it is a function, i would advocate for parenthesis, but what i find on the internet indicates that you can indeed use…
4
votes
2 answers

Getting Local Windows User login session timestamp in C#

I've been trying to look around the various .NET class library's for some where I can get the logged in user of the local machine, either connected to a domain or not. So far System.Security.Principal.WindowsPrincipal LoggedUser =…
Darragh
  • 227
  • 3
  • 9
4
votes
2 answers

Date-fns RangeError: Invalid time value

Hi I want to convert the mongo db created_at timestamp to when It says ... minutes/hours ago using the date-fns library. The function is called formatDistanceToNow which returns time since the date time provided. I'm using Vue for front end but…
Sy3d
  • 197
  • 2
  • 2
  • 18
4
votes
1 answer

PHP Convert Date to Messages Such as Yesterday at 2:00pm - Reverse strtotime

I am trying to build a function that takes a timestamp and generates "relative" string based date, possibly a reverse strtotime! Yesterday at 2pm Yesterday at 3:15pm Earlier Today at 9am Today at 12pm Today at 12:45pm Tomorrow at 5pm Monday at…
Pez Cuckow
  • 14,048
  • 16
  • 80
  • 130
4
votes
2 answers

How do i convert firestore timestamp to date into different format en c#

I'm trying to put a timestamp in a dateTimePicker value in c #, I don't know if it's possible, but I'm getting an error. if is possible, I would like to put it in the format ("dd/MM/yyyy"). dateTimeDate.Value = student.date; but i get this…
4
votes
1 answer

Difference between pandas Timestamp and datetime

I was tinkering around with converting pandas.Timestamp to the built in python datetime. I tried the following: pandas_time = pd.Timestamp(year=2020, day=4, month=2, hour=0, minute=0, second=1) pandas_ts = pandas_time.timestamp() datetime_time =…
debsim
  • 582
  • 4
  • 19
4
votes
0 answers

SnapshotListener not working offline when querying by server timestamp

In my chat app, I retrieve new chat messages via this query: fun getNewChatMessages(chat: Chat, from: Date) = getCollectionForChat(chat) .document(chat.documentId!!) .collection("messages") .orderBy("timeStamp",…
Florian Walther
  • 6,237
  • 5
  • 46
  • 104
4
votes
3 answers

Converting date to timestamp with timezone in Java

I have a PostgreSQL database with a column defined as timestamp I am receiving the date with timezone format yyyy-MM-ddTHH:mm:ss.SSSX", for example 2020-12-16T15:05:26.507Z. If I want to insert this into a column with timestamp it will throw…
user955165
  • 447
  • 3
  • 8
  • 17
4
votes
1 answer

Converting string to timetsamp in Hive

I have a pipeline where im getting data from sqlserver and load it into Hive table.I have a timestamp column in the source which is like 'YYYY-MM-DD HH:MM:SS' Sql table(datetime) ---> Hive stage table(string)---->Hive final table(timestamp) The…
jahan
  • 103
  • 4
  • 19
4
votes
2 answers

Convert Timezone in Dataframe with pandas in python

this might be an easy question to answer but somehow I don't get the solution. The problem is, that I have data from three measurement points. Two of them are using the dtype: datetime64[ns, UTC] But the last one uses dtype: datetime64[ns]. I came…
RoKa
  • 105
  • 6
4
votes
2 answers

Property 'toDate' does not exist on type 'Date' Angular firestore

I am trying to convert timestamp object from Firestore to Date object in TypeScript using toDate(). import { AngularFirestore } from '@angular/fire/firestore'; ... constructor(private database?: AngularFirestore) {...} ... const someVariable =…
Aakash Goplani
  • 1,150
  • 1
  • 19
  • 36
4
votes
1 answer

Plotting gantt chart using timestamps

I am trying to plot a gantt chart using plotly. The important thing is that horizontal swimlanes can have multiple bars separated in time. I found an example of this using calendar dates (YYYY-MM-DD), and am trying to transition using times…
ScottieB
  • 3,958
  • 6
  • 42
  • 60
4
votes
2 answers

Spring test H2 truncates nanoseconds during consequente queries

I am using H2 in-memory database in Spring integration test. I have following column on my entity @Column(nullable = false) private LocalDateTime lastUpdateDateTime; However I noticed some problems in H2, sometimes it truncates nanoseconds…
4
votes
1 answer

Wrong date from timestamp

When I pass 1307433995 its ok 1307433995 2011-06-07 10:06:35 1307433995 but when I pass 1307436121 it`s…
szapio
  • 998
  • 1
  • 9
  • 15
4
votes
1 answer

How can I create timestamped logs and error handle in BASH at the same time?

I am writing a BASH script and two of the things I need it to do is: Provide a timestamped log file. Handle errors. I am finding that these two objectives are clashing. First of all, I am using the ts command to timestamp log entries, e.g.
Alex
  • 43
  • 3