I had a simular problem.
I tried to format my date as dd/mm/yyyy but the month and day got reversed
everytime again.
And that was due to my (windows) settings. They were set as mm/dd/yyyy.
If I changed my settings to dd/mm/yyyy then my code worked fine.
If you try something like this, you will get the same result :
COleDateTime oleDate;
oleDate = COleDateTime::GetCurrentTime();
CString csDate = oleDate.Format(...);
oleDate.ParseDateTime(csDate);
csDate = oleDate.Format(...);
oleDate.ParseDateTime(csDate);
csDate = oleDate.Format(...);
oleDate.ParseDateTime(csDate);
Just parse the string and format it again. You will see that the date and
month get reversed.
That is if you format it NOT like in the settings !
I solved it by keeping the day, month, year, hour, minute and seconds
separately.
I know it's not a good solution, but it worked.
Creating a COleDateTime object can then be done like this :
COleDateTime oleDate;
oleDate.SetDateTime(...);
Hope it helps you out
Greetings
Kurt.S...@vartec.be
Steve Villarreal <randy....@attglobal.net> wrote in message
news:38A40A2F...@attglobal.net...