Skip to content
⌘ NSIS Forum Archive

NSIS how to convert datetime of WMI

3 posts

meoit#

NSIS how to convert datetime of WMI

I am query WMI, result the datetime is 20190523000000.000000+****

How to convert this result to format dd/MM/YYYY ?

Thanks.
Anders#
That looks like a standard YYYYMMDD ISO date, just use StrCpy to extract the parts you need by using the maxlen and start parameters.
meoit#
Thanks Anders.

StrCpy $0 '$R2' 2 6
StrCpy $1 '$R2' 2 4
StrCpy $2 '$R2' 4
StrCpy $out '($0/$1/$2)'