Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 15 Oracle Analytics Lounge
- 208 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 76 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Working with Dates in Oracle Data Visualization Cloud

Summary
Working with Dates in Oracle Data Visualization Cloud
Content
Hi There
How can i check if a date is less or greater than one specific date when writing a condition:
in my example the field which contains my dates is called CSSD.
I set the properties for this field as measurement and date (data type).
i wrote the condition below but it not displaying any information
What should I do different to make this condition to work?
Thanks
Answers
-
Since your CSSD Date is in date format and as you are comparing the date with string you need to cast your date to string and then compare and it should work as expected. However before applying this logic, check your date format how is it retrieving and then compare your string value matching to your date format ( eg: dd/mm/yyyy or mm/dd/yyyy or yyyy/mm/dd)
Your modified logic should look like below.
CASE WHEN CAST(CSSD AS CHAR) > '12/01/2017' THEN 'YES' ELSE 'NO' END
Rgds
Satya
0 -
Hello,
I have still problems because the information is displayed without following the rule added in the calculation called test1
is there any alternative solution?
0 -
it works !!! it is quite tricky to do it but I will keep it on mind.
0 -
In my opinion what is suggesting is not 100%:
CASE WHEN CAST(CSSD AS CHAR) > '12/01/2017' THEN 'YES' ELSE 'NO' END
you are casting the dates as char and then sorting both values by alphabetical order??? (this could cause problems in case you specify days with only 1 digit). Shouldn't it be the other way around?
CASE WHEN CSSD > cast('2012-01-03 00:00:00' as date) THEN 'YES' ELSE 'NO' END
In this way you're actually comparing dates (not strings) , i've done a check and it works. Be aware that i got an error until i specified the 00:00:00 (hour:time:sec)
0