Re: How to parse a string to datetime without a time
- From: "Arjen" <boah123@xxxxxxxxxxx>
- Date: Thu, 3 Jul 2008 21:48:05 +0200
"Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx> schreef in bericht news:op.udqd1req8jd0ej@xxxxxxxxxxxxxxxxxxxxxxx
On Thu, 03 Jul 2008 12:14:52 -0700, Arjen <boah123@xxxxxxxxxxx> wrote:
I have a string with this value 07/11/2008. As you see no time included.
How can I parse this string to a datetime variable? I tried to do this but I get the exception that the format is incorrect.
Did you try the ParseExact() method? I would expect that to work fine.
I tried this but it did not work.
DateTime.ParseExact(Request.Form["date"], @"MM\/dd\/YYYY", null);
.
- Follow-Ups:
- Re: How to parse a string to datetime without a time
- From: Peter Duniho
- Re: How to parse a string to datetime without a time
- From: Arne Vajhøj
- Re: How to parse a string to datetime without a time
- References:
- How to parse a string to datetime without a time
- From: Arjen
- Re: How to parse a string to datetime without a time
- From: Peter Duniho
- How to parse a string to datetime without a time
- Prev by Date: Re: Use MultiBinding to bind polyline point to a thumb
- Next by Date: Re: Using ref
- Previous by thread: Re: How to parse a string to datetime without a time
- Next by thread: Re: How to parse a string to datetime without a time
- Index(es):
Relevant Pages
|