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

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

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -