JSON Formula Error [ =Date() ]

Copper Contributor

I have a column date which was working with JSON  "customRowAction" > "ActionInput" until some days ago, but suddently simply got me the following error:





"=Date(getDate(@now) + '/' + (getMonth(@now) + 1) + '/' + getYear(@now) + ' ' + substring(toLocaleTimeString(@now), 0, 5))"



When I try to choose the value myself, I has the same exactly structure defined inside formula =Date() as above, but it is only use it and I had the error.

If I try to use the same formula in "txtContent" I also have the same error as above.


  1. I also tried using @now and has the same issue.
  2. I also tried using the same structure of the Regional Locale set up for the SharePoint (which is: United States) and I also have the same issue.

>>>> I have tried many other ways, as below, and nothing works:


2Digits Day-Month (test)


"=Date(padStart(toString(getDate(@now)),2 ,'0') + '/' + padStart(toString(getMonth(@now)+1), 2 ,'0') + '/' + getYear(@now) + ' ' + substring(toLocaleTimeString(@now), 0, 5))"



2 Replies
Sorry this is not a solution but a repetition.

I am also using a button > customRowAction > actionInput to update a date column by simply using @now. This worked fine until a little while ago then started showing the same error as above.

If anyone has any solutions it would really be appreciated.

Thanks Mark
I've just found a solution
"=getYear(@now)+'-'+(getMonth(@now)+1)+'-'+getDate(@now) + ' ' + toLocaleTimeString(@now)"
Very similar to that above but with date and year swapped which may have something to do with time settings. In any case it worked for me and I found it in this useful article