Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Creating calculated attribute "year" from "date"

$
0
0

Hello,

 

New to Hana so it might be a stupid question but I have a date attribute in my analytic view and I am trying to create a calculated attribute for 'year' based on the attribute "Date".

 

I thought it should be simple (and may be it is) but when I define the data type as NAVCHAR 4 and expression as "Date", I get the entire date instead of just first 4 characters. I tried expression leftstr("Date",4) but I get an error. Tried several different options Year("Date") etc. but nothing seems to work.

 

Can someone help me please?

 

regards,

 

Manoj


Viewing all articles
Browse latest Browse all 5653

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>