5 Replies Latest reply: Dec 6, 2017 11:40 AM by Richard Chilvers RSS

    Setting date to first in a month

    Kathrine Spang



      I'm trying to set a variable so it's the first in the current month.

      So today 2017-12-06 the variable should read 2017-12-01


      I tried:

      Let vFirstEveryMonth = Date (Year(Today())+Month(Today())+01,'YYYY-MM-DD hh:mm:ss');

      Which returns: 1905-07-22 00:00:00

      I assume since it just adds 2017+12+1=2030 which is the day 1905-07-22.

      Thankful for any help