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
Now1784672148
1 hour ago1784668548
2 hours ago1784664948
3 hours ago1784661348
6 hours ago1784650548
12 hours ago1784628948
1 day ago1784585748
2 days ago1784499348
3 days ago1784412948
1 week ago1784067348
2 weeks ago1783462548
3 weeks ago1782857748
4 weeks ago1782252948
1 month ago1782080148
2 months ago1779401748
3 months ago1776809748
6 months ago1769037348
9 months ago1761084948
1 year ago1753136148
2 years ago1721600148
3 years ago1689977748
5 years ago1626905748
10 years ago1469139348

Upcoming dates

Date Unix timestamp
Now1784672148
In 1 hour1784675748
In 2 hours1784679348
In 3 hours1784682948
In 6 hours1784693748
In 12 hours1784715348
In 1 day1784758548
In 2 days1784844948
In 3 days1784931348
In 1 week1785276948
In 2 weeks1785881748
In 3 weeks1786486548
In 4 weeks1787091348
In 1 month1787350548
In 2 months1790028948
In 3 months1792620948
In 6 months1800573348
In 9 months1808345748
In 1 year1816208148
In 2 years1847830548
In 3 years1879366548
In 5 years1942438548
In 10 years2100291348

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-07-21 22:15:48.345

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 1784672148


#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 21 Jul 18:15:48 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()
1784672148

Option 2

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

Option 3

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

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-07-21 18:15:48'))

Option 2

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

Option 3

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

SELECT FROM_UNIXTIME(1784672148);

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, July 21, 2026 18:15:48

Option 2

Get-Date DisplayHint Date
Tuesday, July 21, 2026

Option 3

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

Option 4

Get-Date -UnixTimeSeconds 1784672148
Tuesday, July 21, 2026 06:15:48 PM

Support our Work


Love ToolsYEP? Support our Work!

TOP