https://www.freepascal.org/docs-html/rtl/sysutils/formatdatetime.htmllook for examples using that etc.