Forum Discussion

LP280388's avatar
LP280388
Icon for Resolver II rankResolver II
1 year ago

Datetime parameter giving error "Enter a DateTime value"

Hi Team, I m getting this error though im giving the right value. is there a way to fix this issue please. this is needed for implementing a Incremental refresh which needs these paramters in datetime type only.

 

 

 

5 Replies

  • Hi LP280388 

     

    Please see the screenshot below:

    Here's the M code

    #datetime(2024, 1, 1, 0, 0, 0) meta [IsParameterQuery=true, Type="DateTime", IsParameterQueryRequired=true]

     

    • LP280388's avatar
      LP280388
      Icon for Resolver II rankResolver II

      danextian

      Hi Thanks for the response. For some reason its not working. I tried with multiple other formats too.

       

       



      #datetime(2024, 1, 1, 0, 0, 0) meta [IsParameterQuery=true, Type="DateTime", IsParameterQueryRequired=true]

        when I give the above M code as well it shows as follows. I see mins 00 is missing though. would that be the reason why its not able fetch the datetime format?

       

      • danextian's avatar
        danextian
        Icon for Super User rankSuper User
        #datetime(2024, 1, 1, 0, 0, 0)

        YYYY, M, D, H, M, S - these time elements are required for the #datetime. You screenshot is missing the seconds. Also this M code looks fine to me

        If you don't follow the required format, the M code will return a text instead of #datetime

        I would suggest you copy the M code I gave and edit from there.