Click here to Skip to main content
15,909,896 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating Guid Pin
Mycroft Holmes16-Oct-11 20:45
professionalMycroft Holmes16-Oct-11 20:45 
GeneralRe: Creating Guid Pin
Member 827944516-Oct-11 20:51
Member 827944516-Oct-11 20:51 
QuestionConverting strings to datetime Pin
CCodeNewbie16-Oct-11 1:29
CCodeNewbie16-Oct-11 1:29 
AnswerRe: Converting strings to datetime Pin
Dan Mos16-Oct-11 1:36
Dan Mos16-Oct-11 1:36 
GeneralRe: Converting strings to datetime Pin
CCodeNewbie16-Oct-11 1:42
CCodeNewbie16-Oct-11 1:42 
GeneralRe: Converting strings to datetime Pin
Richard MacCutchan16-Oct-11 1:45
mveRichard MacCutchan16-Oct-11 1:45 
GeneralRe: Converting strings to datetime Pin
CCodeNewbie16-Oct-11 1:58
CCodeNewbie16-Oct-11 1:58 
GeneralRe: Converting strings to datetime Pin
Richard MacCutchan16-Oct-11 2:40
mveRichard MacCutchan16-Oct-11 2:40 
I used:
C#
culture = CultureInfo.CurrentCulture;
styles = DateTimeStyles.AssumeLocal;

but I also had to ensure the date was in the format of the local style. If you wish to use a non-standard representation of the date then you need to provide your own implementation of the IFormatProvider[^] interface.

Alternatively, since you know this date is YYYYMMDD you could just split it into its constituent parts and recreate it in the default format for your culture.
Unrequited desire is character building. OriginalGriff


AnswerRe: Converting strings to datetime Pin
Dan Mos16-Oct-11 1:58
Dan Mos16-Oct-11 1:58 
AnswerRe: Converting strings to datetime Pin
Abhinav S16-Oct-11 2:17
Abhinav S16-Oct-11 2:17 
AnswerRe: Converting strings to datetime Pin
Luc Pattyn16-Oct-11 8:48
sitebuilderLuc Pattyn16-Oct-11 8:48 
AnswerRe: Converting strings to datetime Pin
André Kraak16-Oct-11 2:35
André Kraak16-Oct-11 2:35 
GeneralRe: Converting strings to datetime Pin
OriginalGriff16-Oct-11 2:37
mveOriginalGriff16-Oct-11 2:37 
GeneralRe: Converting strings to datetime Pin
Richard MacCutchan16-Oct-11 2:41
mveRichard MacCutchan16-Oct-11 2:41 
GeneralRe: Converting strings to datetime Pin
OriginalGriff16-Oct-11 2:56
mveOriginalGriff16-Oct-11 2:56 
GeneralRe: Converting strings to datetime Pin
Richard MacCutchan16-Oct-11 3:03
mveRichard MacCutchan16-Oct-11 3:03 
GeneralRe: Converting strings to datetime Pin
CCodeNewbie16-Oct-11 2:41
CCodeNewbie16-Oct-11 2:41 
GeneralRe: Converting strings to datetime Pin
André Kraak16-Oct-11 2:46
André Kraak16-Oct-11 2:46 
AnswerRe: Converting strings to datetime Pin
OriginalGriff16-Oct-11 2:36
mveOriginalGriff16-Oct-11 2:36 
AnswerRe: Converting strings to datetime - 1000 pts to Griff Pin
CCodeNewbie16-Oct-11 2:56
CCodeNewbie16-Oct-11 2:56 
AnswerRe: Converting strings to datetime Pin
jschell16-Oct-11 9:33
jschell16-Oct-11 9:33 
GeneralRe: Converting strings to datetime Pin
BobJanova16-Oct-11 22:40
BobJanova16-Oct-11 22:40 
QuestionDataRow usage Pin
SFORavi15-Oct-11 10:51
SFORavi15-Oct-11 10:51 
AnswerRe: DataRow usage Pin
SFORavi15-Oct-11 11:08
SFORavi15-Oct-11 11:08 
AnswerRe: DataRow usage Pin
Luc Pattyn15-Oct-11 11:15
sitebuilderLuc Pattyn15-Oct-11 11:15 

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.