BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
carmendee
Obsidian | Level 7

I am trying to add "datepart" to my date field in Information Map Studio and am getting an error when validating.

 

case when <<datepart(ZW_CURRENT_DATE_DIM.CALENDAR_DATE)>> > '08Nov2016'd then '2nd Quarter'
end

1 ACCEPTED SOLUTION

Accepted Solutions
carmendee
Obsidian | Level 7

Attached is the error.  Also, my limited experience with Information Map has required the << and >> as part of the code.

View solution in original post

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well, never used information map, so apologies if this is not the item, but why do you have << and >> around the datepart function?  Also, it may help if you actual post a picture ot the text of what the "error" is, perhaps that isn't a date variable?

carmendee
Obsidian | Level 7

Confirmed calendar date is a date variable.

carmendee
Obsidian | Level 7
Please see where I attached error.
carmendee
Obsidian | Level 7

Attached is the error.  Also, my limited experience with Information Map has required the << and >> as part of the code.

LinusH
Tourmaline | Level 20

In regular SQL, using the syntax "case when", you need a = between your expression and the constant.

Data never sleeps
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

Why have you marked the post containing your error as the solution?  Also, please post the erro as either text or picture in the post, I would not download any Office files.

The syntax of a case statement is:

case when <condition> then <result> [when...] else <result> end

Or

case <variable> when <value> then <result> [when...] else <result> end

 

As I say, never heard of this information map, but I have never seen any system using << >> around variables, that is an operator in some languages.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2109 views
  • 1 like
  • 3 in conversation