Hello - I have a date/time field (DateEffective) that the user will fill out, and I need to determine if the day of the month is before the 15th or from the 15th on. For now, I created another calculated field (Cutoff) to try to get the date value using the getDate method, but it doesn't seem to work. What am I doing wrong?
if (DateEffective.rawValue == null || DateEffective.rawValue.length == 0)
{
Cutoff.rawValue = "waiting";
}
else {
Cutoff.rawValue = DateEffective.getDate();
}
Solved! Go to Solution.
Hi,
The DateEffective is an XFA Object, so doesn't have a getDate() method, and the rawValue of a DateField returns a string, so you will need to turn that into a date object before calling getDate() on it.
Try;
util.scand('yyyy-mm-dd',DateEffective.rawValue).getDate()
Regards
Bruce
Hi,
The DateEffective is an XFA Object, so doesn't have a getDate() method, and the rawValue of a DateField returns a string, so you will need to turn that into a date object before calling getDate() on it.
Try;
util.scand('yyyy-mm-dd',DateEffective.rawValue).getDate()
Regards
Bruce
Thank you so much, that worked perfectly!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies