Completely ripped from https://github.com/johnlindquist/kit/discussions/1116 (Thanks Daniel!) I just like the ISO format better.

Open today-timestamp in Script Kit

// Name: today-timestamp
// Description: inserts today's date in "ISO" format 2023-02-11
// Snippet:
import '@johnlindquist/kit';
function twoDigits(number: number): string {
return number.toString().padStart(2, '0');
}
await hide();
const today = new Date();
const formatted = `${today.getFullYear()}-${twoDigits(today.getMonth() + 1)}-${twoDigits(today.getDate())}`;
await keyboard.type(formatted);