Current Timestamp

This page show the current Unix timestamp

Quanto ti è stato utile questo tool?

Valutazione media: 4.5/5 basata su 12 voti

Support our Work

Unix time stamp in: C++, C#, JAVA, Python, PHP, Javascript, MySQL, Oracle, PostgresSQL, Snowflake, PowerShell, Unix time on Wikipedia.org

Recent dates

Date Unix timestamp
Now1781578780
1 hour ago1781575180
2 hours ago1781571580
3 hours ago1781567980
6 hours ago1781557180
12 hours ago1781535580
1 day ago1781492380
2 days ago1781405980
3 days ago1781319580
1 week ago1780973980
2 weeks ago1780369180
3 weeks ago1779764380
4 weeks ago1779159580
1 month ago1778900380
2 months ago1776308380
3 months ago1773629980
6 months ago1765857580
9 months ago1757991580
1 year ago1750042780
2 years ago1718506780
3 years ago1686884380
5 years ago1623812380
10 years ago1466045980

Upcoming dates

Date Unix timestamp
Now1781578780
In 1 hour1781582380
In 2 hours1781585980
In 3 hours1781589580
In 6 hours1781600380
In 12 hours1781621980
In 1 day1781665180
In 2 days1781751580
In 3 days1781837980
In 1 week1782183580
In 2 weeks1782788380
In 3 weeks1783393180
In 4 weeks1783997980
In 1 month1784170780
In 2 months1786849180
In 3 months1789527580
In 6 months1797393580
In 9 months1805165980
In 1 year1813114780
In 2 years1844737180
In 3 years1876273180
In 5 years1939345180
In 10 years2097197980

How to get current timestamp in Java

Here is an example how you can get current timestamp in Java

Java

import java.sql.Timestamp;
import java.util.Date;

public class CurrentTimeStamp {
    public static void main(String[] args) {
        Date date = new Date();
        System.out.println(new Timestamp(date.getTime()));
    }
}

Output

2026-06-16 02:59:40.507

How to get current timestamp in C++

Here is an example how you can get current timestamp in C++

C++


#include <stdio.h>
#include <time.h>

int main()
{
    time_t now;
    now = time(NULL);
    printf("Current unix time is %d", now);

    return 0;
}

Execution

Current unix time is 1781578780


#include <stdio.h>
#include <time.h>

int main ()
{
  time_t rawtime;
  struct tm * timeinfo;

  time (&rawtime);
  timeinfo = localtime (&rawtime);
  printf ("Current local time and date: %s", asctime(timeinfo));

  return 0;
}

Execution

Current local time and date: Mon 15 Jun 22:59:40 2026

How to get current timestamp in c#

Here is an example how you can get current timestamp in c#

Option 1

DateTimeOffset.UtcNow.ToUnixTimeSeconds()
1781578780

Option 2

DateTimeOffset now = DateTimeOffset.Now;
long timestamp = now.ToUnixTimeMilliseconds();
1781578780508

Option 3

DateTime currentDateUtc = DateTime.UtcNow.Date;
string formattedDate = currentDate.ToString("yyyy-MM-dd")
2026-06-15

How to get current timestamp in Python

Here is an example how you can get current timestamp in Python

import time
import datetime

print "Current unix time: %s" %time.time()
print "Current date and time: " , datetime.datetime.now()

Output

Current unix time: 1409073472.17 Current date and time: 2014-08-26 12:17:52.165704

How to get current timestamp in PHP

Here is an example how you can get current timestamp in PHP

echo time();

How to get current timestamp in Javascript

Here is an example how you can get current timestamp in Javascript

var timestamp = new Date().getTime();

document.write(timestamp);

Output

How to get current timestamp in MySQL

Here is an example how you can get current timestamp in MySQL

CREATE TABLE `mytable` (
`id` int(11) NOT NULL,
`text` varchar(100) NOT NULL,
`epoch` int(11) NOT NULL
);

Option 1

CREATE TABLE `mytable` (
`id` int(11) NOT NULL,
`text` varchar(100) NOT NULL,
`epoch` int(11) NOT NULL
);
INSERT INTO mytable
VALUES(1,'hello',UNIX_TIMESTAMP('2026-06-15 22:59:40'))

Option 2

INSERT INTO mytable
VALUES(1,'hello',UNIX_TIMESTAMP(now()))

Option 3

VALUES(1,'hello',UNIX_TIMESTAMP('1781578780'))

SELECT FROM_UNIXTIME(1781578780);

How to get current timestamp in Oracle

Here is an example how you can get current timestamp in Oracle

Option 1

SELECT SYSTIMESTAMP FROM  DUAL;

Option 2

SELECT CURRENT_TIMESTAMP FROM  DUAL;

How to get current timestamp in PostgreSQL

Here is an example how you can get current timestamp in PostgreSQL

Option 1

SELECT NOW();

Option 2

SELECT CURRENT_TIMESTAMP;

How to get current timestamp in snowflake

Here is an example how you can get current timestamp in snowflake

Option 1

SELECT CURRENT_TIMESTAMP();

Option 2

SELECT CURRENT_TIME();

How to get current timestamp in PowerShell

Here is an example how you can get current timestamp in PowerShell

Option 1

Get-Date
Monday, June 15, 2026 22:59:40

Option 2

Get-Date DisplayHint Date
Monday, June 15, 2026

Option 3

Get-Date -Format "dddd MM/dd/yyyy HH:mm K"
Monday 06/15/2026 19:59 -07:00

Option 4

Get-Date -UnixTimeSeconds 1781578780
Monday, June 15, 2026 10:59:40 PM

Current Timestamp

Current timestamp is also known as Unix timestamp, Unix time, and Unix epoch. It tells the number of seconds that have been elapsed since January 1, 1970 (midnight UTC/GMT). It doesn’t count leap seconds.

What is timestamp?

A timestamp is a sequence of characters or encoded information identifying when a particular event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. Timestamps are used to record when events happen, and can be used to help identify the order in which events occurred, and to provide a way to synchronize events across multiple computers. Timestamps are often associated with computer data, but they can be used in any context where events are recorded and need to be associated with a specific time.

What is an example of a timestamp?

An example of a timestamp could be a date and time in the following format: "2023-01-09 16:33:22" This timestamp would represent the date January 9th, 2023 at 16 hours, 33 minutes, and 22 seconds. Timestamps can be written in many different ways and can include various combinations of the date, time, and timezone. Here are a few more examples of timestamps:

January 9th, 2023 4:33pm: "2023-01-09 16:33"
January 9th, 2023 4:33pm EST: "2023-01-09 16:33 EST"
January 9th, 2023 4:33:22pm EST: "2023-01-09 16:33:22 EST"

Timestamps are often used to record the time when an event occurred, such as when a file was created or modified, or when a message was sent. They can also be used to synchronize events across multiple systems by providing a common point of reference.

How to read timestamp?

Timestamps can be written in a variety of different formats, so the way to read a timestamp can depend on how it is written. Here are a few examples of how to read timestamps in different formats:

  • "2023-01-09 16:33:22" - In this format, the timestamp represents the date January 9th, 2023 at 16 hours, 33 minutes, and 22 seconds. The first 4 digits represent the year, the next 2 represent the month (01 for January), and the last 2 represent the day of the month. The time is represented by the hour (16), minute (33), and second (22).

  • "2023-01-09 16:33" - In this format, the timestamp represents the date January 9th, 2023 at 16 hours and 33 minutes. The date is represented in the same way as the previous example, and the time is represented by the hour (16) and minute (33).

  • "01/09/2023 16:33:22 EST" - In this format, the timestamp represents the date January 9th, 2023 at 16 hours, 33 minutes, and 22 seconds in the Eastern Standard Time zone. The date is represented by the month (01), day (09), and year (2023). The time is represented by the hour (16), minute (33), and second (22). The time zone is represented by the abbreviation "EST".

How long is a timestamp?

There is no set length for a timestamp, as the format of a timestamp can vary. A timestamp could be as short as a single character, or it could be quite long, depending on how much information it is designed to represent. Here are a few examples of timestamps with different lengths:

  • "2023" - This timestamp represents the year 2023, and is 4 characters long.

  • "2023-01-09" - This timestamp represents the date January 9th, 2023, and is 10 characters long.

  • "2023-01-09 16:33:22" - This timestamp represents the date January 9th, 2023 at 16 hours, 33 minutes, and 22 seconds, and is 19 characters long.

  • "2023-01-09 16:33:22 EST" - This timestamp represents the date January 9th, 2023 at 16 hours, 33 minutes, and 22 seconds in the Eastern Standard Time zone, and is 24 characters long.

As you can see, the length of a timestamp can vary depending on the amount of information it is designed to represent.

Is timestamp a date?

A timestamp is often used to represent a date and time, so it can be considered a type of date. A timestamp is a sequence of characters or encoded information identifying when a particular event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. The format of a timestamp can vary, but it often includes a combination of the date and time, and may also include a time zone. Here are a few examples of timestamps that include a date:

  • "2023-01-09" - This timestamp represents the date January 9th, 2023.

  • "2023-01-09 16:33:22" - This timestamp represents the date January 9th, 2023 at 16 hours, 33 minutes, and 22 seconds.

  • "01/09/2023" - This timestamp represents the date January 9th, 2023.

In each of these examples, the timestamp includes a date, so it can be considered a type of date.

What does +0000 mean in timestamp?

The "+0000" in a timestamp usually indicates the Coordinated Universal Time (UTC) offset. UTC is a standardized time that is used as a reference for determining the local time in different time zones around the world. The UTC offset is the number of hours that a time zone is offset from UTC. For example, a time zone with a UTC offset of "+0200" is two hours ahead of UTC, while a time zone with a UTC offset of "-0700" is seven hours behind UTC.

The "+0000" in a timestamp indicates that the time represented by the timestamp is equal to UTC. For example, "2023-01-09 16:33:22 +0000" would represent the date and time January 9th, 2023 at 16 hours, 33 minutes, and 22 seconds in UTC. This would be the same time as in other time zones that have a UTC offset of "+0000".

Support our Work


Love ToolsYEP? Support our Work!

TOP