Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6813049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:31:27+00:00 2026-05-26T20:31:27+00:00

I got the Date value from the method from the following code DATE dDate;

  • 0

I got the Date value from the method from the following code

  DATE dDate;
  hr = pADsUser->get_PasswordLastChanged(&dDate);
  //   pADsUser is pointer variable of   IADsUser

Date type is discribed in the link
http://msdn.microsoft.com/en-us/library/82ab7w69%28v=vs.71%29.aspx

How can I convert this kind of Date to string so that I can print it in console.

I am not using MFC Dlls for this application. so I cannot use the COleDateTime type also.

Is there any built in method available or Do I need to calculate the date manually?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:31:28+00:00Added an answer on May 26, 2026 at 8:31 pm

    Look into Boost.Lexical_cast for conversion to and from string.

    You will have to write a converter function that unpacks the DATE type into a (date, time) tuple so that lexical_cast won’t convert from double.

    According to the doc, it looks like the date type is (day – 1899-12-30) . (time – 0).

    Using boost::date_time, you can create a time object with date-time (1899-12-30,0), then increment days(abs(DATE)) and hours((DATE - abs(DATE)) * 24).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an ATL method that takes a DATE type, which is really a
I've got a date variable that looks like this: Dim LogDate As Date =
I've got some (C#) code that relies on today's date to correctly calculate things
I've got a question about SimpleDateFormat class and the java.util.Date's compareto method: I'm constructing
I need to compare two value (date) from query . String myFormatString = yyyyMMdd;
Hey I got a problem here. I'm trying to retrieve the date from the
I'm trying to convert a string date value from a submitted form into an
I've got this date time string: post[date] = 2007-07-18 10:03:19 I'd like to extract
I have a text like: I've got a date with this fellow tomorrow. Well
I got a string that contains the current date by using this : NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.