• Resolved facil2000

    (@facil2000)


    Hi,

    Is it possible that the function DATEDIFF is not working?

    I am trying all the possible ways…

    Is it right?

    DATEDIFF(fieldname17, fieldname15, dd/mm/yyyy, y)

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @facil2000,

    What is the version number of your copy of the plugin?

    The DATEDIFF operation is included in the Date/Time operations module distributed with the Developer and Platinum version of the plugin.

    Concerning to the equation you sent me as reference, the third and fourth parameters in the DATEDIFF operation are texts, so, the should be enclosed between single or double quotes, as follows:

    
    DATEDIFF(fieldname17, fieldname15, 'dd/mm/yyyy', 'y')
    

    Furthermore, this operation returns an object, so, if you want to know the Years, Months and Days between both dates, the correct equation would be:

    
    (function(){
    var obj = DATEDIFF(fieldname17, fieldname15, 'dd/mm/yyyy', 'y');
    return obj['years']+' year(s), '+obj['months']+' month(s) and '+obj['days']+' day(s)';
    })()
    

    Best regards.

    Thread Starter facil2000

    (@facil2000)

    Thank you so much for your promot response!!!

    I used DATEDIFF(fieldname17, fieldname15, ‘dd/mm/yyyy’, ‘y’), just like this but it does not work…

    fieldname15 and fieldname17 are Field Type: Date Time and the date formar is dd/mm/yyyy

    I don’t know what I am doing wrong…

    Plugin Author codepeople

    (@codepeople)

    Hello @facil2000,

    If you want return the difference in years between dates, the code of the equation would be:

    
    DATEDIFF(fieldname17, fieldname15, 'dd/mm/yyyy', 'y')['years']
    

    If the issue persists, please, send me the url to the webpage with the form inserted to check your code in action.

    Best regards.

    Thread Starter facil2000

    (@facil2000)

    Thanks

    The issue still persists. This is a test link for you to see.

    https://estudiowls.com.ar/test/

    Thanks again

    Plugin Author codepeople

    (@codepeople)

    Hello @facil2000,

    You’re using the free version of the plugin (v1.0.278), and as I said in a previous ticket, the DATEDIFF operation belongs to the Date/Time operations module, distributed only with the Developer and Platinum versions of the plugin.

    Best regards

    Thread Starter facil2000

    (@facil2000)

    I am sorry I didn’t see what you say in your previous ticket.

    Sorry for the inconvenience

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘DATEDIFF Function not working’ is closed to new replies.