Current Timestamp

This page show the current Unix timestamp

Share

Share

How useful was this tool for you?

★★★★★
Average rating: 4.5/5 based on 13 votes

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
Now1794772751
1 hour ago1794769151
2 hours ago1794765551
3 hours ago1794761951
6 hours ago1794751151
12 hours ago1794729551
1 day ago1794686351
2 days ago1794599951
3 days ago1794513551
1 week ago1794167951
2 weeks ago1793563151
3 weeks ago1792954751
4 weeks ago1792349951
1 month ago1792090751
2 months ago1789498751
3 months ago1786820351
6 months ago1778871551
9 months ago1771185551
1 year ago1763236751
2 years ago1731700751
3 years ago1700078351
5 years ago1637006351
10 years ago1479239951

Upcoming dates

Date Unix timestamp
Now1794772751
In 1 hour1794776351
In 2 hours1794779951
In 3 hours1794783551
In 6 hours1794794351
In 12 hours1794815951
In 1 day1794859151
In 2 days1794945551
In 3 days1795031951
In 1 week1795377551
In 2 weeks1795982351
In 3 weeks1796587151
In 4 weeks1797191951
In 1 month1797364751
In 2 months1800043151
In 3 months1802721551
In 6 months1810407551
In 9 months1818356351
In 1 year1826308751
In 2 years1857931151
In 3 years1889467151
In 5 years1952539151
In 10 years2110391951

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-11-15 19:59:11.395

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 1794772751


#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 15 Nov 14:59:11 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()
1794772751

Option 2

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

Option 3

DateTime currentDateUtc = DateTime.UtcNow.Date;
string formattedDate = currentDate.ToString("yyyy-MM-dd")
2026-11-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-11-15 14:59:11'))

Option 2

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

Option 3

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

SELECT FROM_UNIXTIME(1794772751);

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
Sunday, November 15, 2026 14:59:11

Option 2

Get-Date DisplayHint Date
Sunday, November 15, 2026

Option 3

Get-Date -Format "dddd MM/dd/yyyy HH:mm K"
Sunday 11/15/2026 12:59 -07:00

Option 4

Get-Date -UnixTimeSeconds 1794772751
Sunday, November 15, 2026 02:59:11 PM

Share


Love ToolsYEP? Support our Work!

Buy us a coffee
TOP