How to get it in programming languages...

Back to UNIX timestamp epoch converter »

UNIX timestamp

LanguageFunction
C/C++time(0)
Perltime
PHPtime()
Pythontime.time()
RubyTime.now
Time.now.to_i
JavaScriptMath.round(new Date().getTime()/1000.0)
Javalong unixtime = System.currentTimeMillis()/1000;
Microsoft .NET C#unixtime = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
VBScript/ASPDateDiff("s", "01/01/1970 00:00:00", Now())
MySQLSELECT UNIX_TIMESTAMP(NOW())
PostgreSQLSELECT EXTRACT(epoch FROM NOW());
Oracle PL/SQLSELECT (SYSDATE - TO_DATE('01-01-1970 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) *
24 * 60 * 60 FROM DUAL
SQL ServerSELECT DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE())
Unix/Linux shelldate +%s
Back to UNIX timestamp epoch converter »

See also HEX/DEC/OCT/BIN online converter