How to convert string to time_t or struct tm in c++?

Joined
Dec 22, 2009
Messages
7
Reaction score
0
Hi,

I am attempting to creat a very simple Console Application (not .NET) using a default installation of Visual Studio 2005.
i need a function in c++ that recieves a string as date, for example; 10/04/1978, and a mask, such as dd/mm/yyyy, and to convert it to time structure of any type, as time_t or struct tm.

in addition, I need to return the day of the week, a string, as "Sunday".

I can do the conversion, but I don't know how to change it into time_t, and how, if i get a date in format of dd/mm/yyyy, I can take the day of week.

Is there a library that does that? or maybe an open source?

Thanks in advance!
Inbal

:question:
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top