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

Z

ZikO

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 =)
 
M

mlimber

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:

http://www.boost.org/doc/libs/1_36_0/doc/html/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-lite/class-libraries.html#faq-37.9

Cheers! --M
 
Z

ZikO

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

http://www.boost.org/doc/libs/1_36_0/doc/html/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-lite/class-libraries.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;
data_w = Convert::ToDateTime(Form1->dateTimePicker1->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.
 
O

Obnoxious User

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::ToDateTime(Form1->dateTimePicker1->Value);

Try the microsoft.* newsgroups.
 
Z

ZikO

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,464
Latest member
Bobbylenly

Latest Threads

Top