Tuesday, August 20, 2013

how to convert string length in c#

how to convert string length in c#

i have char(10) field (it is Persian date field) in my database. my
control in c# for some date creates char(8). then i have problem in store
procedure(where date between dateFrom and DateTo). i must have char(10). i
want to write function in c# to check the string and if the it's length is
less than 10 convert it to 10. my format is yyyy/mm/dd. (yyyy has no
problem in my control) for example i want to convert 1391/1/1 to
1391/01/01 please help me how i can insert 0 and check the number after /.

No comments:

Post a Comment