Short Date Format

Clean and compact. This script formats the system date into a minimal string, perfect for logs, receipts, or data tables.

Short Format Output:

--/--/--

Copy the Script

<script>
var d = new Date();
var day = String(d.getDate()).padStart(2, '0');
var month = String(d.getMonth() + 1).padStart(2, '0');
var year = String(d.getFullYear()).slice(-2); // Get last 2 digits

document.write(day + "/" + month + "/" + year);
</script>

Frequently Asked Questions

You can take the full year string and use `.slice(-2)` to get the last two digits (e.g., '2025' becomes '25').

Yes. The script includes logic to pad days and months with a leading zero (e.g., turning '1' into '01') for consistent spacing.

Yes. You can easily replace the slash (`/`) in the string concatenation with a dash (`-`) or dot (`.`).