Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Code for this to get output like this
May 3rd, 2014
December 4th, 2011
January 19th, 200
January 1st, 2011
March 3rd, 1900
...
...
Posted
Comments
[no name] 7-Oct-14 17:06pm    
Maybe you and http://www.codeproject.com/script/Membership/View.aspx?mid=11136115 can get together and work on your homework assignments together instead of cheating.

1 solution

You can parse the strings into the type std::tm using std::get_time and format it accordingly to a string using std::strftime:

Please see:
http://en.cppreference.com/w/cpp/chrono/c/tm[^],
http://en.cppreference.com/w/cpp/io/manip/get_time[^],
http://en.cppreference.com/w/cpp/chrono/c/strftime[^].

—SA
 
Share this answer
 
Comments
Maciej Los 7-Oct-14 16:57pm    
Looks like you wanted to answer this question: http://www.codeproject.com/Questions/826785/Need-logic-for-the-Spellout-Dates-below-attached-t?arn=2
Sergey Alexandrovich Kryukov 7-Oct-14 17:12pm    
I think the answer will be the same.
—SA
Sergey Alexandrovich Kryukov 7-Oct-14 18:22pm    
Just look at OP's response below. Not again...
—SA
ravi kumar 7-Oct-14 18:06pm    
can anyone do the code
Sergey Alexandrovich Kryukov 7-Oct-14 18:22pm    
Yes, I hope you can, as well as very many members here. Sorry, but if you feel you cannot, the whole story with your questions would be useless.
You are supposed to do it, if you ask such questions. At the same type, if something is still unclear to you, your follow-up questions will be welcome.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900