Forum Discussion
ArchiveUser
7 years agoQrew Captain
Yikes...yea, simple, indeed.
Thank you for passing this one along - I've been tinkering with this, and know that I need to ID a start and end date, but that leaves me with a couple of questions that you might be able to answer for me:
1. The start and stop can be determined with two calendar fields (appropriately named), correct? In this instance, to follow the pasted coded, 'Status Start' and 'Status End'?
2. In line 4 of the code, there are two references to 'Status Start':
var DateTime StartDateTime = Max([Status Start], ToTimestamp(ToDate([Status Start]), $DayStartTime));
Not being a coding wizard, I am assuming the first reference is to my calendar field 'Status Start'? If so, what is the second reference after 'ToTimestamp'?
Here is the error message that I get from that second reference:
The types of the arguments or the number of arguments supplied do not meet the requirements of the function ToDate.
The function ToDate can be used with the following arguments:
Thank you for passing this one along - I've been tinkering with this, and know that I need to ID a start and end date, but that leaves me with a couple of questions that you might be able to answer for me:
1. The start and stop can be determined with two calendar fields (appropriately named), correct? In this instance, to follow the pasted coded, 'Status Start' and 'Status End'?
2. In line 4 of the code, there are two references to 'Status Start':
var DateTime StartDateTime = Max([Status Start], ToTimestamp(ToDate([Status Start]), $DayStartTime));
Not being a coding wizard, I am assuming the first reference is to my calendar field 'Status Start'? If so, what is the second reference after 'ToTimestamp'?
Here is the error message that I get from that second reference:
The types of the arguments or the number of arguments supplied do not meet the requirements of the function ToDate.
The function ToDate can be used with the following arguments:
- ToDate (Text x).
- ToDate (Text x, Text f).
- ToDate (Date/Time x).