Testtest11
Testtest11

Reputation: 367

yyyy-MM-ddT00:00:00 date format in MDX

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

Answers (1)

musefan
musefan

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

Related Questions