This content has been marked as final. Show 4 replies
I was wondering if I could get some guidance on how to create a table by creating a new column in my data. Currently I have:
AdmitDate, (format: M/D/YYYY)
DischargeDate (format: M/D/YYYY)
I want to create a LOS (length of stay) column that is based on the Admit and Discharge Dates:
LOS = DischargeDate - AdmitDate
In addition, if the DischargeDate column is NULL (or empty: no discharge date), then the LOS would be:
LOS= TODAY - AdmitDate.
I want to do this in the load script, but do not know the syntax to use. Any help is very appreciated.