Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to calculate an age based on two tables, one has the birthdate along with a bunch of data related to the birth and the other contains information on measurements taken on various dates. This looks like it should be so simple but I just can't work it out. I think it must be something to do with a resident load but I just can't work out the practical syntax.
The load statement I have looks like this:
Birth:
LOAD BirthGUID,
Region,
Sex,
Date(Date#(Date,'YYYY-MM-DD hh:mm:ss'),'M/D/YYYY')as Birth_Date,
Weightg as Birth_Weight
FROM
[C:\Users\ etc.
Weighing:
LOAD
BirthGUID,
Date(Date#(Date,'YYYY-MM-DD hh:mm:ss'),'M/D/YYYY') as Weighing_Date,
Weightg as Sample_Weight
FROM
[C:\Users\etc.
I want to be able to calculate the age at weighing as Weighing_Date minus Birth_Date
Thanks so much
Something like this
Birth:
LOAD BirthGUID,
Region,
Sex,
Date(Date#(Date,'YYYY-MM-DD hh:mm:ss'),'M/D/YYYY')as Birth_Date,
Weightg as Birth_Weight
FROM
Weightg as Sample_Weight
FROM
[C:\Users\etc.