[Visual C++ .NET] Picking up the date by user.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ZikO

    [Visual C++ .NET] Picking up the date by user.

    Hello there.

    What is the simplest way to ask customer for a date and get all these
    information like day, month and year of choice? I need it in my program
    to set an event and remember it. Later on i need to calculate what's
    difference in days between actual date and the "future" event.

    Is it possible to do so?

    I thought DateTimePicker would be good choice but i cannot find anything
    about the results that this component would give back.

    Regards =)
  • mlimber

    #2
    Re: Picking up the date by user.

    On Aug 22, 9:07 am, ZikO <ze...@op.plwro te:
    What is the simplest way to ask customer for a date and get all these
    information like day, month and year of choice? I need it in my program
    to set an event and remember it.   Later on i need to calculate what's
    difference in days between actual date and the "future" event.
    >
    Is it possible to do so?
    >
    I thought DateTimePicker would be good choice but i cannot find anything
    about the results that this component would give back.
    The standard facilities here are pretty weak. Check out
    Boost.Date_Time :



    Or go with the other third-party utility of your choice, which are off-
    topic here. You might find some leads in this FAQ:



    Cheers! --M

    Comment

    • ZikO

      #3
      Re: Picking up the date by user.

      >
      The standard facilities here are pretty weak. Check out
      Boost.Date_Time :
      >

      >
      Or go with the other third-party utility of your choice, which are off-
      topic here. You might find some leads in this FAQ:
      >

      >
      Cheers! --M
      Thanks but i think i found the solution at least temporarly.
      ON all .NET platforms there is DateTime component which contains such
      information as DayOfYear, DayOfWeek, Day, Month etc. as well as Value.

      By this simple code i have converted Date from DateTimePicker into
      DateTime Object by this:

      DateTime^ data_w = gcnew DateTime;
      data_w = Convert::ToDate Time(Form1->dateTimePicker 1->Value);

      it more or less does what I need.

      Regards

      PS. Someone gave me a name group news where i can ask for windows
      problems. Can you guys give me that name again? Thanks and sorry for
      incovenients.

      Comment

      • Obnoxious User

        #4
        Re: Picking up the date by user.

        On Fri, 22 Aug 2008 18:43:06 +0100, ZikO wrote:
        >The standard facilities here are pretty weak. Check out
        >Boost.Date_Tim e:
        >>
        >http://www.boost.org/doc/libs/1_36_0...date_time.html
        >>
        >Or go with the other third-party utility of your choice, which are off-
        >topic here. You might find some leads in this FAQ:
        >>
        >http://www.parashift.com/c++-faq-lit....html#faq-37.9
        >>
        >Cheers! --M
        >
        Thanks but i think i found the solution at least temporarly. ON all .NET
        platforms there is DateTime component which contains such information as
        DayOfYear, DayOfWeek, Day, Month etc. as well as Value.
        >
        By this simple code i have converted Date from DateTimePicker into
        DateTime Object by this:
        >
        DateTime^ data_w = gcnew DateTime;>
        it more or less does what I need.
        >
        Isn't this C++/CLI? Because it surely isn't C++!
        Regards
        >
        PS. Someone gave me a name group news where i can ask for windows
        problems. Can you guys give me that name again? Thanks and sorry for
        incovenients.
        data_w = Convert::ToDate Time(Form1->dateTimePicker 1->Value);
        Try the microsoft.* newsgroups.

        --
        OU

        Comment

        • ZikO

          #5
          Re: Picking up the date by user.

          >
          Isn't this C++/CLI? Because it surely isn't C++!
          >
          I have written my code in C++ although I didnt find any better
          alternative to have quicker way to program windows and yes you are
          probably right it's CLI.
          >
          Try the microsoft.* newsgroups.
          >
          thanks

          Comment

          Working...