Convert string to systemtime (date) !

Posted on 1999-07-16
Medium Priority
Last Modified: 2008-03-17
char szBufSTART[22]; // Is '1999-07-16-10.30.00'
I want to convert this string to SYSTEMTIME (or date, but then have to know how I convert SYSTEMTIME to date). How do I do that?
Question by:bert1
  • 3

Author Comment

ID: 1200367
Im using Borland C++ 5.02. (windows not dos dates please)

Accepted Solution

jasonclarke earned 80 total points
ID: 1200368
You can use something like this (the day of week is not set though):

      SYSTEMTIME stime;
      char szBufSTART[] = "1999-07-16-10.30.00";



Author Comment

ID: 1200369
And then sTime = szBufSTART; ??

Author Comment

ID: 1200370
Sorry I was to fast forget:

"And then sTime = szBufSTART; ??"

Thanks! :-)

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question