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

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -