Hello,
I have a table that contains a date column, with the following details :
Name : BILL_DATE
Type : Date
Length : 8
Format : DATETIME20.
Informat : DATETIME20.
Label : BILL_DATE
I'm trying to retrieve the month value of each row, so I'm using the computed column advanced expression with the following statement ; month(t1.BILL_DATE)
The results are Null, any ideas why this might me happening?
while on the other hand the statement datepart(t1.BILL_DATE) is returning normal values!
Thank you
You have to take datepart first : month(datepart(bill_date))
Month -function is assuming that there is date as a input.
Ok, and how can I fix this? is there a walk-around or something?
You have to take datepart first : month(datepart(bill_date))
Much appreicated
Thank you so much
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.