Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Manipulating Data Prior To Display
Message
From
22/12/2004 13:29:36
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00967471
Message ID:
00971528
Views:
28
Sorry for the delay in getting back to you Kevin, I was on vacation for a coupla days visiting family.

I think you're just not using the correct overload of the DateTime.Parse() method. Check out the docs ... there's an overload that takes 3 parameters and I *think* that may be the one you need (the 3rd parameter is the DateTimeStyles enumerator) ... I haven't done this, so I'm not 100% sure that it will solve your problem, so check it out and lemme know.

~~Bonnie



>Sorry, me again.
>
>I have got it to compile without errors now.
>
>>s1 = s1.Substring(s1.Length() - 9);
>
>This was fixed by removing the brackets after .Length
>
>I also had to define the d1 and d2 properties with
>
>System.DateTime d1, d2;
>
>Unfortunately, the ASP page now crashes every time on the line
>
>d2 = DateTime.Parse(s1);
>
>I *think* that the Parse method is expecting the s1 string to be in the format "20/12/04" rather than "20-Dec-04"? Is this the case, and if so, how do I deal with my date formats?
>
>TIA, Kevin
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