Re: Convert a string to a datetime using a pattern
- From: "Arjen" <boah123@xxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 13:51:02 +0200
string myString = "1-1-2000";
DateTime myDateTime = DateTime.Parse(myString);
Hope this helps,
Arjen
"Iwan Petrow" <xxxxyz@xxxxxx> schreef in bericht
news:1122464653.611036.165920@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have a string which represent a date as follow: "dd-.MM-.yyyy hh:mm".
> How could I convert this string to DateTime type (I prefer somehow to
> set this as a pattern if it is possible because I have other
> possibilities as "dd~MM~yyyy, hh:mm")?
>
> Thanks.
>
.
- Follow-Ups:
- Re: Convert a string to a datetime using a pattern
- From: Iwan Petrow
- Re: Convert a string to a datetime using a pattern
- References:
- Convert a string to a datetime using a pattern
- From: Iwan Petrow
- Convert a string to a datetime using a pattern
- Prev by Date: Serial Communication in C# Express
- Next by Date: RE: An Easy One - Images
- Previous by thread: Convert a string to a datetime using a pattern
- Next by thread: Re: Convert a string to a datetime using a pattern
- Index(es):
Relevant Pages
|