Support Board
Date/Time: Sun, 08 Sep 2024 00:09:08 +0000
Post From: SetDate() won't set only the date portion of a DateTime...
[2023-10-17 20:32:10] |
j4ytr4der_ - Posts: 933 |
Can't figure out what I'm doing wrong here. I'm trying to modify only the date portion of a datetime input, under certain conditions. But every time, it actually changes the type of the input from a datetime, to just a date. Same thing I try to modify only the time, it changes it to a time input instead. Am I missing something simple? Here's the relevant code: SCDateTime CurrentInputEndDateTime; CurrentInputEndDateTime.SetDate(Input_ReplayEndDateTime.GetDateTime().GetDate()); SCDateTime CurrentInputStartDateTime; CurrentInputStartDateTime.SetDate(Input_ReplayStartDateTime.GetDateTime().GetDate()); if(CurrentInputStartDateTime > CurrentInputEndDateTime || sc.ChartDataStartDate > sc.ChartDataEndDate ) Input_ReplayStartDateTime.SetDate(Input_ReplayEndDateTime.GetDateTime().GetDate()); Every time, I just wind up with a date and no timestamp for my Input_ReplayStartDateTime input. Have tried every variation/approach to this I can think of. According to the documentation: SetDate() sets the date part of the SCDateTime variable with the given Date. Date must be given as a Date Value. The existing time portion of the SCDateTime variable is preserved when using the SetDate() function. What have I overlooked here? Date Time Of Last Edit: 2023-10-17 20:42:05
|