Posts: 1,058
Threads: 367
Joined: Oct 2007
The following statements give correct output with 2.3.3.0
Macro
temp
Trigger
SF12
str s="23-06-2010 10:28:39"
str st.from(_s.get(s 6 4) _s.get(s 3 2) _s.get(s 0 2) " " _s.get(s 11 2) _s.get(s 14 2) _s.get(s 17 2))
out st
;20100623 102839
However the result is erroneous (39) woth 2.3.3.2.
Please advise.
Posts: 12,091
Threads: 142
Joined: Dec 2002
Cannot use the same str variable as argument calling a function multiple times, because then previously evaluated argument becomes invalid. Worked previously accidentally.
Posts: 12,091
Threads: 142
Joined: Dec 2002
Macro
Macro1622
str s="23-06-2010 10:28:39"
;str st.from(_s.get(s 6 4) _s.get(s 3 2) _s.get(s 0 2) " " _s.get(s 11 2) _s.get(s 14 2) _s.get(s 17 2)) ;;error
str st.fromn(s+6 4 s+3 2 s 2 " " 1 s+11 2 s+14 2 s+17 2) ;;use this
out st
;20100623 102839
or
Macro
Macro1623
str s="23-06-2010 10:28:39"
;str st.from(_s.get(s 6 4) _s.get(s 3 2) _s.get(s 0 2) " " _s.get(s 11 2) _s.get(s 14 2) _s.get(s 17 2)) ;;error
s.replacerx("^(\d\d)-(\d\d)-(\d\d\d\d) (\d\d):(\d\d):(\d\d)$" "$3$2$1 $4$5$6") ;;use this
out s
;20100623 102839
Posts: 1,058
Threads: 367
Joined: Oct 2007
Dear Gintaras, Thanks. I can assure you it is working properly since 2005 that I started using QM. Anyway I will correct it. Regards Simos.
Posts: 12,091
Threads: 142
Joined: Dec 2002
Posts: 1,058
Threads: 367
Joined: Oct 2007
Thanks, perfect, although the solution you proposed with fromn is smarter. Regards.