Current Timestamp

This page show the current Unix timestamp

Quanto ti è stato utile questo tool?

Valutazione media: 4.3/5 basata su 6 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
Now1780438291
1 hour ago1780434691
2 hours ago1780431091
3 hours ago1780427491
6 hours ago1780416691
12 hours ago1780395091
1 day ago1780351891
2 days ago1780265491
3 days ago1780179091
1 week ago1779833491
2 weeks ago1779228691
3 weeks ago1778623891
4 weeks ago1778019091
1 month ago1777759891
2 months ago1775167891
3 months ago1772493091
6 months ago1764717091
9 months ago1756851091
1 year ago1748902291
2 years ago1717366291
3 years ago1685743891
5 years ago1622671891
10 years ago1464905491

Upcoming dates

Date Unix timestamp
Now1780438291
In 1 hour1780441891
In 2 hours1780445491
In 3 hours1780449091
In 6 hours1780459891
In 12 hours1780481491
In 1 day1780524691
In 2 days1780611091
In 3 days1780697491
In 1 week1781043091
In 2 weeks1781647891
In 3 weeks1782252691
In 4 weeks1782857491
In 1 month1783030291
In 2 months1785708691
In 3 months1788387091
In 6 months1796253091
In 9 months1804029091
In 1 year1811974291
In 2 years1843596691
In 3 years1875132691
In 5 years1938204691
In 10 years2096057491

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-02 22:11:31.266

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 1780438291


#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: Tue 02 Jun 18:11:31 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()
1780438291

Option 2

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

Option 3

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

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-02 18:11:31'))

Option 2

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

Option 3

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

SELECT FROM_UNIXTIME(1780438291);

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
Tuesday, June 2, 2026 18:11:31

Option 2

Get-Date DisplayHint Date
Tuesday, June 2, 2026

Option 3

Get-Date -Format "dddd MM/dd/yyyy HH:mm K"
Tuesday 06/02/2026 15:11 -07:00

Option 4

Get-Date -UnixTimeSeconds 1780438291
Tuesday, June 02, 2026 06:11:31 PM

Support our Work


Love ToolsYEP? Support our Work!

TOP