Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

705 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