World Clock 24

Date & Time Formatter

Format Dates in ISO 8601, Unix, SQL & Regional Formats

What Is a Date & Time Formatter?

Developers, analysts, and system administrators frequently need dates in specific string formats — ISO 8601 for APIs, Unix timestamps for databases, RFC 2822 for emails, or SQL datetime for queries. This tool converts any date and time into 8 standard formats, each with copy-to-clipboard and code snippets in JavaScript, Python, Java, C#, C++, Kotlin, Go, and Rust.

All conversions run in your browser using the Intl API and the IANA Time Zone Database. No data is sent to a server.

Formatted Results:

ISO 8601 / Zulu Time (UTC):
Format Specifier:
JavaScript: date.toISOString()
Python: datetime.utcnow().isoformat() + 'Z'
Java: Instant.now().toString()
C#: DateTime.UtcNow.ToString("o")
C++: std::format("{:%FT%TZ}", std::chrono::utc_clock::now())
Kotlin: Instant.now().toString()
Go: time.Now().UTC().Format(time.RFC3339Nano)
Rust: Utc::now().to_rfc3339()
RFC 2822:
Format Specifier:
JavaScript: date.toUTCString()
Python: datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")
Java: DateTimeFormatter.RFC_1123_DATE_TIME.format(ZonedDateTime.now(ZoneOffset.UTC))
C#: DateTime.UtcNow.ToString("R")
C++: std::format("{:%a, %d %b %Y %H:%M:%S GMT}", ...)
Kotlin: ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.RFC_1123_DATE_TIME)
Unix Timestamp:
Format Specifier:
JavaScript: Math.floor(Date.now() / 1000)
Python: int(datetime.now().timestamp())
Java: Instant.now().getEpochSecond()
C#: DateTimeOffset.UtcNow.ToUnixTimeSeconds()
C++: std::chrono::duration_cast<std::chrono::seconds>(std::chrono::system_clock::now().time_since_epoch()).count()
Kotlin: Instant.now().epochSecond
Go: time.Now().Unix()
Rust: SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()
UTC (Zulu) - Readable:
Format Specifier:
JavaScript: date.toUTCString().replace(' GMT', ' UTC')
Python: datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S UTC")
Java: ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss 'UTC'"))
C#: DateTime.UtcNow.ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'")
US Format (MM/DD/YYYY HH:MM:SS):
Format Specifier:
JavaScript: Intl.DateTimeFormat('en-US', {year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false}).format(date)
Python: datetime.now().strftime("%m/%d/%Y %H:%M:%S")
Java: DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss").format(LocalDateTime.now())
C#: DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
C++: std::format("{:%m/%d/%Y %H:%M:%S}", std::chrono::system_clock::now())
Kotlin: LocalDateTime.now().format(DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss"))
European Format (DD/MM/YYYY HH:MM:SS):
Format Specifier:
JavaScript: Intl.DateTimeFormat('en-GB', {year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false}).format(date)
Python: datetime.now().strftime("%d/%m/%Y %H:%M:%S")
Java: DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss").format(LocalDateTime.now())
C#: DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")
C++: std::format("{:%d/%m/%Y %H:%M:%S}", std::chrono::system_clock::now())
Kotlin: LocalDateTime.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss"))
ISO 8601 (Local Time):
Format Specifier:
JavaScript: new Date().toISOString().slice(0, -1) + timezoneOffset
Python: datetime.now().isoformat()
Java: ZonedDateTime.now().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
C#: DateTime.Now.ToString("yyyy-MM-ddTHH:mm:sszzz")
C++: std::format("{:%FT%T%z}", std::chrono::zoned_time{...})
Kotlin: ZonedDateTime.now().format(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
Go: time.Now().Format(time.RFC3339)
Rust: Local::now().to_rfc3339()
SQL DateTime:
Format Specifier:
JavaScript: date.toISOString().slice(0, 19).replace('T', ' ')
Python: datetime.now().strftime("%Y-%m-%d %H:%M:%S")
Java: LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
C#: DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
C++: std::format("{:%Y-%m-%d %H:%M:%S}", std::chrono::system_clock::now())
Kotlin: LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
MySQL: NOW() or DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%s')
PostgreSQL: NOW() or to_char(NOW(), 'YYYY-MM-DD HH24:MI:SS')

Understanding Date & Time Formats

Different systems and regions use different date and time representations. ISO 8601 is the international standard favored by APIs and databases. Unix timestamps measure seconds since January 1, 1970 (the "epoch") and are widely used in programming. RFC 2822 is the standard for email headers and HTTP responses.

Frequently Asked Questions

What is Zulu time?

"Zulu time" is another name for UTC (Coordinated Universal Time). The "Z" at the end of an ISO 8601 string (e.g., 2026-01-15T12:00:00Z) stands for "zero offset" from UTC, and "Zulu" is the NATO phonetic alphabet word for "Z".

Why do developers use Unix timestamps?

Unix timestamps are a single integer representing a moment in time, making them easy to compare, sort, and store. They're timezone-agnostic (always UTC-based), which avoids ambiguity in distributed systems.

What's the difference between ISO 8601 UTC and local?

ISO 8601 UTC ends with "Z" (e.g., 2026-01-15T12:00:00Z), meaning the time is in UTC. ISO 8601 local includes an offset (e.g., 2026-01-15T07:00:00-05:00), showing the time in a specific timezone.