Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get a Date String out of DateTime String
Message
From
03/02/2005 10:05:07
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00983438
Message ID:
00983450
Views:
14
Dmitry,

But what datatype is drWORK_HIS["date_clos"]? Is it a date datatype? What is your backend data?

~~Bonnie



>>Dmitry,
>>
>>Try using the following.
>>
>>DateTime test = new DateTime(4, 2, 3);
>>Console.WriteLine(test.Date.ToShortDateString());
>>
>>Regards
>>Neil
>
>
>Neil and Bonnie,
>
>Unfortunately my DateTime string is of type String. Here is how I get it from a Data Reader:
>
>
>string strDateClosed = drWORK_HIS["date_clos"].ToString();
>
>
>Therefore, I can't see how I can apply the method ToShortDateString to it.
>
>Thank you both for your suggestions.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform