cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to add/compare minutes in MDM Validaiton?

Former Member
0 Kudos
69

Hi All,

Is it possible to compare MInutes or add minutes to the existing time stamp/system funciton in MDM? Say I have a field which holds the time stamp for which i need to add 5 minutes.. How can I add and then I need to compare ?

Thanks

Rajeev

View Entire Topic
Former Member
0 Kudos

Hi Rajeev,

You can compare 2 time stamp fields. There are implementations done where we need to compare start time and end time to check start time is always less than the end time. this can be achieved through Validations.

In a similar fashion, using assignments you can also add some value to the existing time stamp and assign the value to another time stamp.

Regards,

Sravan

Former Member
0 Kudos

Hi,

My requirement is as below:

I have two Time stamp fields say Created and Modified...

I need to syndicate only when create Time stamp is less than or equal to 3 minutes to Modified time stamp...

So I need to check the two dates fields with respect to minutes, Is it possible?

Thanks

Rajeev

Former Member
0 Kudos

Hi Rajeev,

Try creating a validation expression like below

IF ((MODIFIED - CREATED)<3, TRUE, FALSE)

this expression will return true when the difference is less than 3 and else will return false.

Now create a workflow and add the branch to assign the above validation. Put the syndicate step for true and stop for false.

This should solve your purpose. let me know if it does.

Regards,

Sravan

Former Member
0 Kudos

Hi,

It Doesnt work as I need to check on minutes not days..

Suppose I have Create Time stamp as 12/1/2011 10:10:00 and Update Time stamp as 12/1/2011 10:13:00 it should syndicate.. If it is Create Time stamp as 12/1/2011 10:10:00 and Update Time stamp as 12/1/2011 10:13:03 it should not syndiacte...

Any suggestions.

Thanks

Rajeev

Former Member
0 Kudos

Hello,

PLease check this thread

let us know if this servers your purpose

Regards,

Abhishek

Former Member
0 Kudos

Hi Rajeev,

It will be a bit complex to compare two time stamp.

There is no direct way but you can do some workaround to achieve the same.

If your time stamp is showing 12/1/2012 10:10:00 then internal;y it is represented as 2012:01:12:10:10:00:000.

If you notice the length for date ,hour and minutes is fixed.What you can do you can write an expression using if then else where first you can check LEFT(Created,10)=LEFT(Modified,10),if this statement is truethen check hourand then compare minutes but here also you need to make many considerations like suppose your created time is 11:58:00:000 and modified is

12:01:00:000 and also suppose date is 2012:01:12:11:57:00:000 and modified time is 2012:01:13:00:00:00:000.

So when you write expression you need to use logical parameters and consider all the special cases as well.

Basicaly you have to play with functions and operators available.

But you can surely achieve it.

I hope it will give you some idea.

Regards,

Neethu Joy

Former Member
0 Kudos

Hi Rajeev,

In the expression mentioned by meabove, replace3 with 0.002083333.

Now the expression becomes

IF( (MODIFIED-CREATED)<0.002083333,TRUE, FALSE)

Try this and let me know. 0.002083333 is the text representation of 3 minutes.

I think this should work.

Regards,

Sravan

Former Member
0 Kudos

Thanks Sravan, Its working as expected.

Regards,

Rajeev

Former Member
0 Kudos

Hello Sravan,

Please explain the logic for the expression 0.002083333.,

how do you come abt this.

Regards,

Abhishek