Forum Discussion

AlexBennett3's avatar
AlexBennett3
Qrew Trainee
5 years ago

ToWorkDate() won't work?

Hey Everyone,

I'm having some trouble reformatting my code to get the result of a start date + duration in Numeric to result in a WorkDate, because it seems if it's just the type Date, my duration doesn't include the start date, but If I can convert to WorkDate, then it will include the start date. (For Calendar purposes) According to the QuickBase support center, I can just use: ToWorkDate([Start]) to convert a type Date to WorkDate. However, whenever I attempt this in a Formula - Date Field, I get an error saying expecting date but found workdate... Ok so then if I change it to ToWorkDate(ToDate([Start])), I get an error saying expecting datetime / workdate but got date. The only way i've been able to format this code is to do: ToDate(ToWorkDate([Start])) but then nothing changes in my result for it to include my start date in the duration. For example, If I have a job phase thats showing up in my calendar that is 1 day, the calendar will take the start date and add 1 day, making it 2 days on my calendar, how can I go about this to have the start date included in the count? So that 1 day duration should just be the day that is the start date. What am I doing wrong here??


Notice Above the 2 durations that say 1 Day...


Notice how the durations on the calendars are saying 2 days because it is adding "From" the start date, but not including it, so everything has an extra day...

Any help would be appreciated as I've hit a roadblock with this one!

Thanks!

------------------------------
Alex Bennett
------------------------------
  • If you need to produce a WorkDate, your formula field needs to be a Formula WorkDate instead of a Formula Date

    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------
    • AlexBennett3's avatar
      AlexBennett3
      Qrew Trainee

      Not seeing an option for Formula - WorkDate.


      ------------------------------
      Alex Bennett
      ------------------------------