Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a string to datetime in C++

Tags:

I have a resultset(from a function) which is based on time. But the datetime value is in string format(e.g. "21:5 Jan 23, 11"). I want to convert "21:5 Jan 23, 11" to datetime. How can I do this in C++? I just want to filter records for today. So i need to retrieve the current date from "21:5 Jan 23, 11".

Edit:

I can get the current date and time using SYSTEMTIME st; GetSystemTime(&st);

Is there any way to convert "21:5 Jan 23, 11" in the above format?