on 11-24-2010 3:14 PM
Hi All,
We have a requirement to compare the date field with the system date.
Requirement:
1. Check with the System Date is equal to the Update Date
2. If yes - Fail the validation
3. If No - No errors.
I tried the following, but none helped.
1. IF(SYSTIME(0) = Update_date, FALSE, TRUE)
2. IF(LEFT(SYSTIME(0),11) < LEFT(Update_date,11),FALSE, TRUE)
I tried with ABS, and changing <> = everything.. but nothing works.
We are using MDM 7.1 SP04. Please let me know, how to implement this.
Thanks,
Priya.
Hi Priya,
Requirement:
1. Check with the System Date is equal to the Update Date
2. If yes - Fail the validation
3. If No - No errors.
Please use this below expression.
IF(LEFT(SYSTIME(0),11) = LEFT(Update Date,11), FALSE, TRUE)
Note: I am using MDM 7.1 SP04, This expression is absolutely working fine at my end.
Kindly revert with result.
Regards,
Mandeep Saini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mandeep,
Even i tried this. it doesnot work for me.
The behaviour is
1. IF Updated Date = System Date -- then the validation Fails -- Looks fine
2. If the Updated Date is not equal -- then also the validation fails -.--- which is not right.
For me by default... what ever may be the condition, it always executes the THEN part.
Thanks,
Priya.
Hi Priya,
Interesting, I am not able to figure out why this is happening at your end when same expression is working fine at my end.
I am under impression you used the same expression as i suggested above using LEFT function and 11, else it will not give you desired output. Please use the same above expression and Also, make sure that you have selected FALSE and TRUE and = from Operators tab of Expression. Don't write anything except numeric values 0 and 11, Please select field name from Fields tab and IF, SYSTIME and LEFT from Functions tab of Expression. Please check if it helps you out.
Regards,
Mandeep Saini
Hi Priya,
Can you please try:
Option 1: IF(LEFT(SYSTIME(0),10) = LEFT(Update Date,10), FALSE, TRUE)
Option 2: In Expressions.. choose Operator= is TRUE ; Value LEFT(SYSTIME(0),10) = LEFT(Update Date,10)
If this does not work, please include what is the Date format you have in Update Date field and System time.
Thanks,
Priti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I think i found the issue.
This Validation works fine -- IF(LEFT(SYSTIME(0),10) = LEFT(Update Date,10), FALSE, TRUE)
if i try to run it manually in the DM, but i make it Automatic Execution error, then always the THEN part is executed, inspite of the condition given.
Have anyone tried this.
Thanks,
Priya.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.