c# - ToString Format -
i have string "00.00-0-00" , need transform "0000-0/00"
i tried: field.tostring("####-##/##") ' without success string.format(cultureinfo.invariantculture, "{0:####-#/##}", field) 'without success
any that?
here how (val input string)
string.format(@"{0}{1}-{2}/{3}", val.substring(0,2), val.substring(3,2), val.substring(6,1), val.substring(8,2));
if don't string.format use concatenation (+
)
Comments
Post a Comment