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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 3112 views
  • 1 like
  • 3 in conversation