Calculation field -

Comments

2 comments

  • Rainer Grabowski

    Hi Tanya,

    var type = (@Labour Cost Hrs (A) ? @Labour Cost Hrs  (A) : @Labour Cost Hrs (B));
    var date = Number (moment(@Date of Task).tz("Pacific/Auckland").format('YYYYMMDD'));
    var rate = date <= 20221231 ? 36 : 42; 
    type*rate

    Please note that I changed the date format to YYYYMMDD. In combination with the Number() function you get a eight digit number for each date (e.g 20230201 = 01.02.2023) which you then can compare to 20221231 (=  31.12.2022). This is only one of multiple possibilities to compare dates.

    Rainer
     

    0
    Comment actions Permalink
  • Tanya Taylor

    Thanks Rainer - I had tried multiple different calc options - but all based on it being a Date not a Number!  Thanks for you assistance, this has worked well.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk