Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I got a field (Bdate) which consists of a birthdate in a textformat like this 050453.
I´d like to load the field formatting it to a real date and looking like this 05-04-1953 so I can make a script that calculates the age
AGE(today(),Bdate) as Personage
What do I do?
can use Or Age
Age (Date(today(),Date(Date#(Bdate,'DDMMYY'),'DD-MM-YYYY')))
other function is interval
Using this IF makes no ages - its all blank
I now got a date like this 07-06-64
How would you make a script solving the problem with 64 and 63
You need to decide yourself which cutoff you want. One way is to use
If( Year(Date) > 2020, AddYears(Date,-100), Date) as NewDate
where Date is your expression that interprets the date. Then all dates after 2020 will be "moved" 100 years back in time.
HIC
I´m not quite sure that I understand.
I got a field AGE starting with -50 to 50.
All ages with minus got birthdates before 1964.
All positiv numbers are ok ages
Then you can use an expression where you don't accept negative ages:
IF( Age<0, Age+100, Age) as NewAge
HIC
Sorry to moan but...
Can people please read whole threads before responding. There are so many similar responses here that it is difficult to find the best one. In this case please look at Henric's reponse who (as usual) has it spot-on.