R
Randall Parker
I'm using this:
MyDateTimeStr = MyDateTimeVal.ToString("MM-dd-yyyy hh:mm:ss tt");
in C# to convert what I read from a form submit.
What I want is something more flexible where the minutes and seconds are optional.
How to do that?
I want to able to specify several variations as all legal:
6-30-2005 4pm
6-30-2005 4 pm
6-30-2005 4:30 pm
6-30-2005 4:30:15 pm
6-30-2005 4:30:15 p
6-30-05 4:30:15 pm
And similarly with slashes:
6/30/2005 4:30:15 pm
MyDateTimeStr = MyDateTimeVal.ToString("MM-dd-yyyy hh:mm:ss tt");
in C# to convert what I read from a form submit.
What I want is something more flexible where the minutes and seconds are optional.
How to do that?
I want to able to specify several variations as all legal:
6-30-2005 4pm
6-30-2005 4 pm
6-30-2005 4:30 pm
6-30-2005 4:30:15 pm
6-30-2005 4:30:15 p
6-30-05 4:30:15 pm
And similarly with slashes:
6/30/2005 4:30:15 pm