hi,
i want to retrieve only the second field from system datetime..how can i do that??can anyone plz help me..thanks in advance

Recommended Answers

All 4 Replies

Welcome to @Daniweb.

I didn't get your question. Do you want to get Parts (Day, Month etc from DateTime?

DateTime date=DateTime.Now;
Console.WriteLine(date.Day);
Console.WriteLine(date.Month);

hi,
thanks for your reply...datetime gives time and date both..now my question is i just want to pick second field from that time

You can use date.Date or date.ToString(format) method.

DateTime date=DateTime.Now;
Console.WriteLine(date.ToString("d"));
Console.WriteLine(date.ToString("t"));
Console.WriteLine(date.ToString("hh:mm:ss tt"));
Console.WriteLine(date.TimeOfDay.ToString());

HI,
can anyone pls help me regarding the following context..suppose i hv 3 form in javascript..when user give valid info in the first form then only the 2nd one will enable..after validation of 2nd one the 3rd one will enable ..not only that say 1st form has a title when i click on that title the form will enable ..and when i click on the title again the form will disable ..how it can be done???any hints..( ya 1 more thing without using any library i have to perform the task..)

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.