Reputation: 367
How I can get current date on YYYY-MM-dd (2016-10-28) format in MDX?
Format(Now(),'YYYY-MM-dd')
Doesn't work.
EDIT: I've just check that MDX convert my YYYY-MM-dd format to yyyy-MM-ddT00:00:00 (I compare my date with current date) so I need something like:
Format(now(), "yyyy-MM-ddT00:00:00")
Upvotes: 0
Views: 5955
Reputation: 48445
Never even heard of MDX but with a quick Google search it seems you should use the following format:
Format(Now(),'yyyy-MM-dd')
Notice the lower case y
for year.
This information was deduced from here.
After Edit
The new format you want would therefore be:
Format(Now(),'yyyy-MM-ddT00:00:00')
Upvotes: 1