문제

I Have this date "27/03/1985" and because it starts with days i can't convert it to datetime.

도움이 되었습니까?

해결책

See: http://msdn.microsoft.com/en-us/library/w2sa9yss.aspx

DateTime.ParseExact() lets you specify the format of the string representation.

다른 팁

Yes you can. You just need to use the right culture specifier. It's a UK date so you need so supply the correct format provider:

dateValue = DateTime.Parse(dateString, culture);

where culture is of type CultureInfo

Source

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top