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
Now1777307238
1 hour ago1777303638
2 hours ago1777300038
3 hours ago1777296438
6 hours ago1777285638
12 hours ago1777264038
1 day ago1777220838
2 days ago1777134438
3 days ago1777048038
1 week ago1776702438
2 weeks ago1776097638
3 weeks ago1775492838
4 weeks ago1774888038
1 month ago1774628838
2 months ago1772213238
3 months ago1769534838
6 months ago1761582438
9 months ago1753633638
1 year ago1745771238
2 years ago1714235238
3 years ago1682612838
5 years ago1619540838
10 years ago1461774438

Upcoming dates

Date Unix timestamp
Now1777307238
In 1 hour1777310838
In 2 hours1777314438
In 3 hours1777318038
In 6 hours1777328838
In 12 hours1777350438
In 1 day1777393638
In 2 days1777480038
In 3 days1777566438
In 1 week1777912038
In 2 weeks1778516838
In 3 weeks1779121638
In 4 weeks1779726438
In 1 month1779899238
In 2 months1782577638
In 3 months1785169638
In 6 months1793118438
In 9 months1801070838
In 1 year1808843238
In 2 years1840465638
In 3 years1872001638
In 5 years1935073638
In 10 years2092926438

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-04-27 16:27:18.627

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 1777307238

#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 27 Apr 12:27:18 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()
1777307238

Option 2

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

Option 3

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

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

1777307238

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-04-27 12:27:18'))

Option 2

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

Option 3

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

SELECT FROM_UNIXTIME(1777307238);

Output

2026-04-27 12:27:18

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
Monday, April 27, 2026 12:27:18

Option 2

Get-Date DisplayHint Date
Monday, April 27, 2026

Option 3

Get-Date -Format "dddd MM/dd/yyyy HH:mm K"
Monday 04/27/2026 09:27 -07:00

Option 4

Get-Date -UnixTimeSeconds 1777307238
Monday, April 27, 2026 12:27:18 PM

Support our Work


Love ToolsYEP? Support our Work!

TOP