03-23-2018, 01:21 AM
Thank you for your patience with me. I have converted your macro in english locale. It still gives an error at the date conversion statement:
Function Macro_180320a
Let us put it in a simpler way. The following simple macro does not work and the explanation is give in thread www.quickmacros.com/forum/showthread.php?tid=679
Function Macro_180320b
Nevertheless, the following one it works:
Function Macro_180320c
Best regards.
Function Macro_180320a
;www.quickmacros.com/forum/showthread.php?tid=6379
;str s.timeformat("{DD}")
str s.timeformat("{DD}" 0 WINAPI.LANG_ENGLISH|WINAPI.SUBLANG_ENGLISH_US)
out s
// remove day and comma from string
int i = find(s "," 0 1)
s.remove(0 i+1)
s.trim
out s
//convert to Date
DATE d1(s)
;Error (RT) in <open ":7772: /278">Macro_180320a: 0x80020005, Type mismatch. <help #IDP_ERR>?
out d1
//convert to DateTime if needed
DateTime d.FromStr(s) ;;;directly from string
out d.ToStr(1)
DateTime d2.FromDATE(d1);;from Date
out d2.ToStr(1)Let us put it in a simpler way. The following simple macro does not work and the explanation is give in thread www.quickmacros.com/forum/showthread.php?tid=679
Function Macro_180320b
Nevertheless, the following one it works:
Function Macro_180320c
Best regards.
