03-23-2018, 03:37 AM
this code works on my pc every time.
Outputs
03/22/2018
this code
str s.timeformat("{DD}")
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)
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)
Outputs
Thursday, March 22, 2018
March 22, 2018
03/22/2018
03/22/2018
03/22/2018
if your output is not the same then its a language issue..
Outputs
03/22/2018
this code
str s.timeformat("{DD}")
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)
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)
Outputs
Thursday, March 22, 2018
March 22, 2018
03/22/2018
03/22/2018
03/22/2018
if your output is not the same then its a language issue..
