Click here to Skip to main content
15,893,564 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I signal that my thread is solved Pin
OriginalGriff18-Mar-11 0:11
mveOriginalGriff18-Mar-11 0:11 
Questionis it possible to make setup for WebService ? Pin
goldsoft17-Mar-11 22:52
goldsoft17-Mar-11 22:52 
AnswerRe: is it possible to make setup for WebService ? Pin
Pete O'Hanlon17-Mar-11 22:57
mvePete O'Hanlon17-Mar-11 22:57 
QuestionWord 2010 automation Pin
Abhi Lahare17-Mar-11 9:20
Abhi Lahare17-Mar-11 9:20 
AnswerRe: Word 2010 automation [modified] Pin
Paladin200017-Mar-11 10:26
Paladin200017-Mar-11 10:26 
GeneralRe: Word 2010 automation Pin
Abhi Lahare17-Mar-11 11:25
Abhi Lahare17-Mar-11 11:25 
AnswerRe: Word 2010 automation Pin
Luc Pattyn17-Mar-11 11:36
sitebuilderLuc Pattyn17-Mar-11 11:36 
QuestionDateTime.ParseExact Won't Work Pin
Kevin Marois17-Mar-11 6:55
professionalKevin Marois17-Mar-11 6:55 
What's wrong with this????

The date string I'm trying to parse is initially in this format - "date: wed, 16 mar 2011 17:09:37 -0700". I pull off the "date: " portion and remove the comma. That results in "wed 16 mar 2011 17:09:37 -0700".

Here's my code:
// Initial Formats
//Date: Thu, 10 Mar 2011 15:47:58 -0800

string[] words = Line.Split(' ');

string dtstring = words[2].PadLeft(2, '0') + " " + words[3] + " " + words[4] + " " + words[5];

DateTime datetime = DateTime.ParseExact(dtstring, "dd MMM yyyy hh:mm:ss", CultureInfo.InvariantCulture);


I'm getting "String was not recognized as a valid DateTime."

Help!
Everything makes sense in someone's mind

AnswerRe: DateTime.ParseExact Won't Work Pin
Luc Pattyn17-Mar-11 7:04
sitebuilderLuc Pattyn17-Mar-11 7:04 
GeneralRe: DateTime.ParseExact Won't Work Pin
Kevin Marois17-Mar-11 7:07
professionalKevin Marois17-Mar-11 7:07 
GeneralRe: DateTime.ParseExact Won't Work Pin
Luc Pattyn17-Mar-11 7:16
sitebuilderLuc Pattyn17-Mar-11 7:16 
AnswerRe: DateTime.ParseExact Won't Work Pin
musefan17-Mar-11 7:13
musefan17-Mar-11 7:13 
GeneralRe: DateTime.ParseExact Won't Work Pin
Kevin Marois17-Mar-11 7:14
professionalKevin Marois17-Mar-11 7:14 
GeneralRe: DateTime.ParseExact Won't Work Pin
musefan17-Mar-11 7:16
musefan17-Mar-11 7:16 
GeneralRe: DateTime.ParseExact Won't Work Pin
Pete O'Hanlon17-Mar-11 7:18
mvePete O'Hanlon17-Mar-11 7:18 
GeneralRe: DateTime.ParseExact Won't Work Pin
musefan17-Mar-11 7:22
musefan17-Mar-11 7:22 
GeneralRe: DateTime.ParseExact Won't Work Pin
Luc Pattyn17-Mar-11 7:18
sitebuilderLuc Pattyn17-Mar-11 7:18 
AnswerRe: DateTime.ParseExact Won't Work Pin
Pete O'Hanlon17-Mar-11 7:17
mvePete O'Hanlon17-Mar-11 7:17 
QuestionWPF: Binding Storyboard.RepeatBehavior property Pin
Lutosław16-Mar-11 13:40
Lutosław16-Mar-11 13:40 
GeneralRe: WPF: Binding Storyboard.RepeatBehavior property Pin
thatraja16-Mar-11 17:23
professionalthatraja16-Mar-11 17:23 
GeneralMessage Removed Pin
16-Mar-11 22:02
Lutosław16-Mar-11 22:02 
GeneralMessage Removed Pin
16-Mar-11 23:38
mvePete O'Hanlon16-Mar-11 23:38 
GeneralMessage Removed Pin
17-Mar-11 0:21
professionalDoru_C17-Mar-11 0:21 
GeneralRe: WPF: Binding Storyboard.RepeatBehavior property Pin
Pete O'Hanlon17-Mar-11 0:44
mvePete O'Hanlon17-Mar-11 0:44 
GeneralMy vote of 1 PinPopular
Keith Barrow17-Mar-11 2:14
professionalKeith Barrow17-Mar-11 2:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.