how do I?

get a formatted, human-readable timestamp for a file

By default date is clear but not very useful for files or any sort of scripting.

> date

Sun 22 Mar 11:52:41 GMT 2026

Get-Date isn't much better in Powershell

> Get-Date

Sunday 22 March 2026 11:53:17

With a little formatting we get something a little more useful for files and scripts

>  date +"%Y%m%d-%H%M%S"

20260322-115606
> Get-Date -Format "yyyyMMdd-HHmmss"

20260322-120034

> Get-Date -UFormat "%Y%m%d-%H%M%S"
20260322-120201