Current Timestamp

This page show the current Unix timestamp

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
Now1779041423
1 hour ago1779037823
2 hours ago1779034223
3 hours ago1779030623
6 hours ago1779019823
12 hours ago1778998223
1 day ago1778955023
2 days ago1778868623
3 days ago1778782223
1 week ago1778436623
2 weeks ago1777831823
3 weeks ago1777227023
4 weeks ago1776622223
1 month ago1776449423
2 months ago1773771023
3 months ago1771355423
6 months ago1763406623
9 months ago1755454223
1 year ago1747505423
2 years ago1715969423
3 years ago1684347023
5 years ago1621275023
10 years ago1463508623

Upcoming dates

Date Unix timestamp
Now1779041423
In 1 hour1779045023
In 2 hours1779048623
In 3 hours1779052223
In 6 hours1779063023
In 12 hours1779084623
In 1 day1779127823
In 2 days1779214223
In 3 days1779300623
In 1 week1779646223
In 2 weeks1780251023
In 3 weeks1780855823
In 4 weeks1781460623
In 1 month1781719823
In 2 months1784311823
In 3 months1786990223
In 6 months1794942623
In 9 months1802891423
In 1 year1810577423
In 2 years1842199823
In 3 years1873735823
In 5 years1936807823
In 10 years2094660623

How to get current timestamp in Java

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

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

Output

2026-05-17 18:10:23.670

How to get current timestamp in C++

Here is an example how you can get current timestamp in 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 1779041423

#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: Sun 17 May 14:10:23 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()
1779041423

Option 2

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

Option 3

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

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

<?php echo time(); ?>

Output

1779041423

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

INSERT INTO mytable VALUES(1,'hello',UNIX_TIMESTAMP('2026-05-17 14:10:23'))

Option 2

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

Option 3

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

SELECT FROM_UNIXTIME(1779041423);

Output

2026-05-17 14:10:23

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 NOW();

How to get current timestamp in PowerShell

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

Option 1

Get-Date
Sunday, May 17, 2026 14:10:23

Option 2

Get-Date DisplayHint Date
Sunday, May 17, 2026

Option 3

Get-Date -Format "dddd MM/dd/yyyy HH:mm K"
Sunday 05/17/2026 11:10 -07:00

Option 4

Get-Date -UnixTimeSeconds 1779041423
Sunday, May 17, 2026 02:10:23 PM

Support our Work


Love ToolsYEP? Support our Work!

TOP