Click here to Skip to main content
15,902,032 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: toolbar with icons on left and right Pin
Carlos Antollini23-Oct-03 12:18
Carlos Antollini23-Oct-03 12:18 
GeneralRe: toolbar with icons on left and right Pin
quzi25-Oct-03 19:42
quzi25-Oct-03 19:42 
GeneralNext Step in remote App. control Pin
Member 18130723-Oct-03 4:37
Member 18130723-Oct-03 4:37 
GeneralRe: Next Step in remote App. control Pin
Kentamanos23-Oct-03 7:37
Kentamanos23-Oct-03 7:37 
GeneralDrag and Drop Application Pin
Bryster23-Oct-03 3:53
Bryster23-Oct-03 3:53 
GeneralRe: Drag and Drop Application Pin
valikac23-Oct-03 5:51
valikac23-Oct-03 5:51 
GeneralRe: Drag and Drop Application Pin
Michael Dunn23-Oct-03 11:26
sitebuilderMichael Dunn23-Oct-03 11:26 
GeneralCOleDateTime::Format behavior Pin
sagmam23-Oct-03 3:38
sagmam23-Oct-03 3:38 
Hi, I'm writing an international application, and therefore, I need to display dates and times using the user-locale. When I go to: Control Panel->Regional Settings->Regional Options tab->customize->Date tab, I see TWO date formats: SHORT and LONG.

Now, I write the following lines in my code:

COleDateTime date;
date.SetDate(2003,10,23);
CString s = date.Format((DWORD)VAR_DATEVALUEONLY); // format the date only

When I display 's', the contents of 's' are the SHORT version of the date, as it is configured in the dialog mentioned above.

My question is : how does COleDateTime know to choose the SHORT version and not the LONG version? Is it configurable through code? The reason I'm asking, is that later on I need to use the same string in order to populate another COleDateTime object, using the COleDateTime::ParseDateTime method, and I have to be sure that the method will work. As far as my tests went, ParseDateTime FAILED when given a LONG date string, so I have to be absolutely sure that COleDateTime::Format will ALWAYS use the SHORT date. And if possible, issue some command to ensure this.

Any ideas? Thanks.



/=/=/=/=
Deus
/=/=/=/=
GeneralRe: COleDateTime::Format behavior Pin
David Crow23-Oct-03 3:53
David Crow23-Oct-03 3:53 
GeneralRe: COleDateTime::Format behavior Pin
sagmam23-Oct-03 5:21
sagmam23-Oct-03 5:21 
GeneralRe: COleDateTime::Format behavior Pin
BadJerry23-Oct-03 5:38
BadJerry23-Oct-03 5:38 
GeneralRe: COleDateTime::Format behavior Pin
sagmam23-Oct-03 5:43
sagmam23-Oct-03 5:43 
GeneralRe: COleDateTime::Format behavior Pin
BadJerry23-Oct-03 6:01
BadJerry23-Oct-03 6:01 
GeneralRe: COleDateTime::Format behavior Pin
sagmam23-Oct-03 6:53
sagmam23-Oct-03 6:53 
GeneralRe: COleDateTime::Format behavior Pin
Atlantys23-Oct-03 6:52
Atlantys23-Oct-03 6:52 
QuestionHow can I disable the Dial-Up dialog box? Pin
Radar9723-Oct-03 2:47
Radar9723-Oct-03 2:47 
QuestionSetTimer ? Pin
Brian van der Beek23-Oct-03 2:06
Brian van der Beek23-Oct-03 2:06 
AnswerRe: SetTimer ? Pin
Maximilien23-Oct-03 2:34
Maximilien23-Oct-03 2:34 
AnswerRe: SetTimer ? Pin
jhwurmbach23-Oct-03 4:10
jhwurmbach23-Oct-03 4:10 
GeneralRe: SetTimer ? Pin
Brian van der Beek23-Oct-03 4:32
Brian van der Beek23-Oct-03 4:32 
GeneralRe: SetTimer ? Pin
jhwurmbach23-Oct-03 4:40
jhwurmbach23-Oct-03 4:40 
AnswerRe: SetTimer ? Pin
John R. Shaw23-Oct-03 4:33
John R. Shaw23-Oct-03 4:33 
QuestionSetTimer ? Pin
Brian van der Beek23-Oct-03 2:05
Brian van der Beek23-Oct-03 2:05 
AnswerRe: SetTimer ? Pin
Bryster23-Oct-03 4:07
Bryster23-Oct-03 4:07 
GeneralNeed a satisfying logger. Pin
d00_ape23-Oct-03 2:00
sussd00_ape23-Oct-03 2:00 

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.