Current Timestamp

This page show the current Unix timestamp

Quanto ti è stato utile questo tool?

Valutazione media: 4.5/5 basata su 13 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
Now1786822108
1 hour ago1786818508
2 hours ago1786814908
3 hours ago1786811308
6 hours ago1786800508
12 hours ago1786778908
1 day ago1786735708
2 days ago1786649308
3 days ago1786562908
1 week ago1786217308
2 weeks ago1785612508
3 weeks ago1785007708
4 weeks ago1784402908
1 month ago1784143708
2 months ago1781551708
3 months ago1778873308
6 months ago1771187308
9 months ago1763238508
1 year ago1755286108
2 years ago1723750108
3 years ago1692127708
5 years ago1629055708
10 years ago1471289308

Upcoming dates

Date Unix timestamp
Now1786822108
In 1 hour1786825708
In 2 hours1786829308
In 3 hours1786832908
In 6 hours1786843708
In 12 hours1786865308
In 1 day1786908508
In 2 days1786994908
In 3 days1787081308
In 1 week1787426908
In 2 weeks1788031708
In 3 weeks1788636508
In 4 weeks1789241308
In 1 month1789500508
In 2 months1792092508
In 3 months1794774508
In 6 months1802723308
In 9 months1810409308
In 1 year1818358108
In 2 years1849980508
In 3 years1881516508
In 5 years1944588508
In 10 years2102441308

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-08-15 19:28:28.464

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 1786822108


#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: Sat 15 Aug 15:28:28 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()
1786822108

Option 2

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

Option 3

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

Option 2

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

Option 3

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

SELECT FROM_UNIXTIME(1786822108);

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
Saturday, August 15, 2026 15:28:28

Option 2

Get-Date DisplayHint Date
Saturday, August 15, 2026

Option 3

Get-Date -Format "dddd MM/dd/yyyy HH:mm K"
Saturday 08/15/2026 12:28 -07:00

Option 4

Get-Date -UnixTimeSeconds 1786822108
Saturday, August 15, 2026 03:28:28 PM

Support our Work


Love ToolsYEP? Support our Work!

TOP