How to set the datetimpicker value back to current datetime on a buttion click
-
I am with a C#.net Inventory application in one of my form there is a datetimepicker whose value my change according to some selections how can I set the datetimpicker value back to current datetime on a buttion click. I put like datetimepicker1.Text=DateTime.Now.Date.ToString(); but its text is not getting the current datetime Thanks In advance Regarda Anu Palavila
Thanks & Regards
-
I am with a C#.net Inventory application in one of my form there is a datetimepicker whose value my change according to some selections how can I set the datetimpicker value back to current datetime on a buttion click. I put like datetimepicker1.Text=DateTime.Now.Date.ToString(); but its text is not getting the current datetime Thanks In advance Regarda Anu Palavila
Thanks & Regards
-
I am with a C#.net Inventory application in one of my form there is a datetimepicker whose value my change according to some selections how can I set the datetimpicker value back to current datetime on a buttion click. I put like datetimepicker1.Text=DateTime.Now.Date.ToString(); but its text is not getting the current datetime Thanks In advance Regarda Anu Palavila
Thanks & Regards
-
dateTimePicker1.Value = DateTime.Now.AddHours(-24); and 24*365 hours will be equal to one year
ali zaidi wrote:
and 24*365 hours will be equal to one year
No.....
Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.