Any ideas? This doesn't make any sense.
Year and month work fine, but no matter what, I can't get a date...
I am trying to get the current date in the format of YearMonthDay (2005117) in C++.NET.
That format is ambiguous, isn't it? You get 2005117 for both 2005-01-17 and 2005-11-07.
EDIT: Oh, and I'm guessing that dt.Day is the day of the week.
EDIT2: No, I'm wrong... never mind.
Yeah, I realized that.
Month and date should be double digit always.
I am looking to get 20051107.
That doesn't change the problem I am having with the date.
Just realized I was in Release build and wasn't using the variable anywhere yet so it was being optimized away.
I have switched my code to: String* sDate = dt.ToString( "yyyyMMdd" );
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.