Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

Date in Expression

Hi Community,

I have show date in expression depending on selection - date

my date for date is like below

   

42306.496701389
42306.774351852
42307.396550926
42309.655138889
42310.837152778
42310.839803241
42310.840185185

for others I am showing like

Only({<%Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'},CURRENCY = {'$(=$(vCurr))'}>}DESCRIPTION)

but I am not able show date. Can some one please help me

4 Replies
swuehl
MVP
MVP

Only() will only return a value if there is a single possible distinct value returned.

Maybe use another aggregation function like

Min({<%Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'},CURRENCY = {'$(=$(vCurr))'}>} Date)


Or explain more detailed what you want to achieve and how your data model looks like.

sunny_talwar

May be something like this:

Only({<%Date = {"$(='>=' & Num(DayStart($(=vCurrDate))) & '<=' & Num(DayEnd($(=vCurrDate))))"}, %Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'}, CURRENCY = {'$(=$(vCurr))'}>}DESCRIPTION)

priyarane
Specialist
Specialist
Author

Thanks Sunny and Swuehl for your reply.

This is working for me

only({<%Month = {'$(=$(=vCurrMonth))'}, %Year = {'$(=$(=vCurrYear))'},CURRENCY = {'$(=$(vCurr))'}>}Date(SUBMISSION_DATE))

Numbe tabl - expression default.

swuehl
MVP
MVP

Ok, so your request was about formatting?

Please note that your SUBMISSION_DATE values seem to be timestamp in fact, so you can format them as dates using Date() function for display purposes, but the values keep the decimals.