I need to have the current date and time from the DesktopDateTimePicker, and I find everywhere I look this code to get it:
Var currentDateTime As DateTime = DateTime.Now
But I get this error:
WinStoryCalendarEvents.butTodayEventDate.Action, line 2
Type "Integer" has no member named "Now"
Var currentDateTime As DateTime = DateTime.Now
Any suggestions how to get the Now date and time?
Update: I got it to work, there was a property set as integer… This is now the working code:
// Initialize the property with the current date and time
Var currentDateTime As DateTime = DateTime.Now
// Set the DateTimePicker to the current date and time
DateTimePickerEvents.SelectedDate = currentDateTime.Now