Forum Discussion
Datetime parameter giving error "Enter a DateTime value"
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]
- LP2803881 year ago
Resolver 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?
- danextian1 year ago
Super 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.
- LP2803881 year ago
Resolver II
Yes I have been tring with the M code only. When I see in the output I see that the seconds are missing. Any idea what could be wrong with this datatime format?