Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Fix Date with 0 Padding
touchdate = "1/1/01 " touchdate = "1/31/01 " touchdate = "12/1/01 "And convert to 8 characters:
01/01/01 01/31/01 12/01/01Thanks.
#DefineFunction fixdate8(d) d=StrReplace(d," ","") d1=StrFixLeft(ItemExtract(1,d,"/"),0,2) d2=StrFixLeft(ItemExtract(2,d,"/"),0,2) d3=StrFixLeft(ItemExtract(3,d,"/"),0,2) Return(StrCat(d1,"/",d2,"/",d3)) #EndFunction touchdate = "1/1/01 " fixeddate=fixdate8(touchdate) Message(touchdate,fixeddate) touchdate = "1/31/01 " fixeddate=fixdate8(touchdate) Message(touchdate,fixeddate) touchdate = "12/1/01 " fixeddate=fixdate8(touchdate) Message(touchdate,fixeddate)
Article ID: W15722File Created: 2003:05:28:10:23:42Last Updated: 2003:05:28:10:23:42