Highlighted
Absent Member.. Absent Member..
Absent Member..
496 views

how date comparision works?

Jump to solution
Hi,

i am using one condition in validation of the form as requested.end.date>=tod()

if this condition is wrong, it should through a error message 'Requested end date cannot be in the past'
the date format is 12/20/10 00:44:48

it works fine for 2010 year. if I select next year's date (jan-1-2-11), it is giving me error message.

how can I overcome this issue? how this comparision works?

Thanks in advance.
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..
That might have something to do with the date formats. You could try this one, add this calculation to the wizard.escalation.rfc format control record:
$requested.end.date=val($requested.end.date,3)
This should execute on "Add."

Before using this, check what is right parameter for "val" function with you dateformat.

View solution in original post

6 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..
What is the error message it's giving you? That would help.

The expression should be:
requested.end.date in $file>tod()
----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
we gave error message in validation of the form design as 'Requested end date cannot be in the past'
for the condition requested.end.date>=tod().

if I select next year's date, then it is giving me error.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
That might have something to do with the date formats. You could try this one, add this calculation to the wizard.escalation.rfc format control record:
$requested.end.date=val($requested.end.date,3)
This should execute on "Add."

Before using this, check what is right parameter for "val" function with you dateformat.

View solution in original post

Highlighted
Absent Member.. Absent Member..
Absent Member..
Hi John,

the fix you have provided is working for me.

What is actual logic behind it? can you please explain me?
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..
I got this solution from support when I had a similar case. As well as I know, this converts the provided date to a format that SM understand correctly. (From help: A RAD function that converts a datum to a different data type.)

Seems that there is problems in the SM logic when handling different date type formats than US based.
0 Likes
Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..

hello,

 

somehow still  $requested.end.date=val($requested.end.date,3) is not working for me. its creates interaction record but not change record with the same error.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.