Forum Discussion

UchennaOgbejesi's avatar
UchennaOgbejesi
Qrew Trainee
5 years ago
Solved

Using Variables in Formulas

Hello all, I'm trying to create a formula checkbox to check off between two hardcoded dates/times each month. My current formula looks like this: var DateTime FebPRStart = DateTime(02-01-2020 ...
  • AustinK's avatar
    AustinK
    5 years ago
    Without testing it I believe this one should work. It was missing some parenthesis in a few spots. A misspelled word and also using Today at the end instead of Now. This might work, if not post back.

    This is just what Mark posted with those things adjusted.

    var DateTime FebPRStart = ToTimeStamp(ToDate("02-01-2020"), ToTimeOfDay("12:00 AM"));
    var DateTime FebPREnd = ToTimeStamp(ToDate("02-15-2020"), ToTimeOfDay("11:59 PM"));
    var Bool FebCalc = Now() >= $FebPRStart and Now() <= $FebPREnd;