Forum Discussion

Nunzino_Pizza's avatar
Nunzino_Pizza
Copper Contributor
Dec 27, 2022

Sharepoint syntax check

I am getting a syntax error when testing a date column. First, check to see if a column date is above a specific date, then multiply a given column by one number if true another if false. The formula is below.

 

=If ([Delivery Date]>Date(2022,12,1),[Weight Ticket Volume]*2,[Weight Ticket Volume]*2.56)

 

Help

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    Nunzino_Pizza it's the Date(2022,12,1) that is causing the problem. This works (note, my SharePoint is set to dd/mm/yyyy format):

     

    =IF([Delivery Date]>01/12/2022,[Weight Ticket Volume]*2,[Weight Ticket Volume]*2.56)

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

    • Nunzino_Pizza's avatar
      Nunzino_Pizza
      Copper Contributor
      Thanks, as I stayed up till 2:00 am yesterday, I found a space in the [Delivery Date_] column. Removing the space a to [Delivery Date] and putting the Date Function as DATE fixed the error. Thank you, Rob, for your comment much appreciated this is my first experience in the group.

Resources