1
要するに、私はnow()と比較する必要がある日付型のプロパティを持っていますが、この比較が機能する2つの異なる環境(言語設定)があります。MDX言語に依存しない日付比較
私は次のコードを持っている:
with
member [Measures].[Opening] as
CDate([Store].[Store].Properties('Opening')) // works with the english date
member [Measures].[Opening] as // works with the german date
DateSerial(
Right([Store].[Store].Properties('Opening'),4),
Mid([Store].[Store].Properties('Opening'),4,2),
Left([Store].[Store].Properties('Opening'),2)
)
member [Measures].[IsOpen] as
CASE
WHEN [Measures].[Opening] < NOW()
THEN 1
ELSE 0
END
[Store].[Store].Properties('Opening')
は日付です。
しかし、実行する必要のある言語設定が異なる2つのサーバーがあります。 1つ戻る02.10.2009と[Opening]の他の10/2/2009。
両方の環境で動作するソリューションを見つける必要があります。 (ただし、言語設定を変更することはできません)
FORMAT_STRINGまたはLANGUAGEで書式を設定しようとしましたが、これまでのところ成功しませんでした。
私のスニペットが役に立ちましたか? – whytheq
第3の助けがありました。 –