Can somebody tall me formula to convert text data in the field “OrGjed” from this
if it is
993 convert to 993-00-00
00701 convert to 007-01-00
0030101 convert to 003-01-01
Can somebody tall me formula to convert text data in the field “OrGjed” from this
if it is
993 convert to 993-00-00
00701 convert to 007-01-00
0030101 convert to 003-01-01
Subject: Formula to convert numbers
@left(OrGjed;3)+“-”+@if(@middle(OrGjed;3;2)=“”;“00”;@middle(OrGjed;3;2))+“-”+@if(@middle(OrGjed;5;2)=“”;“00”;@middle(OrGjed;5;2))
Subject: RE: Formula to convert numbers
Thanks…while wating i came up with this:
@If(@Length(OrGjed) = 3; OrGjed+ “-00-00”; @Length(OrGjed) = 5; @Left(OrGjed; 3) + “-”+ @Middle(OrGjed; 3; 2) + “-00”;@Length(OrGjed)=7; @Left(OrGjed; 3) + “-” + @Middle(OrGjed; 3; 2) + “-” + @Middle(OrGjed; 5; 2);
“”);
Subject: Another option
OVal := “993”;ValwithZeros := Oval +@Repeat(“0”;7-@Length(Oval));
@Middle(ValwithZeros;1;3) +“-”+ @Middle(ValwithZeros;4;5)+“-”+@Middle(ValwithZeros;6;7)