How is it possbile to return the current hour, minute and DayOfWeek.
I have tried out these examples. The two first returns 0 wich is strange.
And the third does not go through the compiler. What can I be missing ?

System::DateTime moment = System::DateTime();
int hour = moment.Hour; //returns 0 ?

System::DateTime moment = System::DateTime();
int minute = moment.Minute; //returns 0 ?

String^ day =  DateTime::ToString(DateTime::DayOfWeek);
//Does not compile ?
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.