cancel
Showing results for 
Search instead for 
Did you mean: 

Finding first date in hana graphical calculation view

karthik1993
Participant
0 Kudos

Can anyone tell me how to calculate first date of a month in hana graphical calculation view? EX: 23-07-2018 should become 01-07-2018

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

You can create a calculated date column which uses the component function to extract the month and year of your date. As the beginning of the month is always 1, you have then all components to create build the new date. If your current date is not in a date format, you can use conversion function date to convert your value into a date.

Regards,
Florian

Answers (2)

Answers (2)

0 Kudos

You can create a calculated column with datatype as Date.

Please paste the below code in the expression editor.

date (format("CREATEDON",'YYYYMM'))

former_member302041
Contributor
0 Kudos

ADD_MONTHS(NEXT_DAY(LAST_DAY(YOUR_DATE_FIELD)),-1)