string-formatting

Convert number into date using javascript

Convert number into date using javascript questions : I have date in without “/” in text field and it is in mm/dd/yy format. We received input in this format 03292014. I want to get month,date and year from this number like 03/29/2014 var m = new Date(3292014*1000) console.log(m.toGMTString())   ————————– Answer :

[ Read More ]

StringFormat, ConverterCulture, and a textbox’s decimal mark

StringFormat, ConverterCulture, and a textbox’s decimal mark questions : I’d like to resolve a small quirk I’ve been having. It’s not really a quirk but rather a behavior I’d like to change if possible. If I use a {N:2} StringFormat/ConverterCulture, a TextBox is forced into having a decimal mark always (even during the

[ Read More ]

Format a double value to fit into a maximum string size

Format a double value to fit into a maximum string size questions : I need to format a double value so that it fits within a field of 13 characters. Is there a way to do this with String.Format or am I stuck with character-by-character work? Edits: (hopefully they will stay this time)

[ Read More ]