Forum Discussion
this beauty will show like
2 yrs 11 months and 5 days
you can drop the days part and get years and months.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Sorry, try this: substitute your field name for date of birth into the first line.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- JenniferDriscol2 years agoQrew Member
Hi,
I tried Both. The first one said there is a syntax error--parenthesis are mismatched. the 2nd one said that there are extra characters at the end. What in the heck am i doing wrong. I copied and pasted
------------------------------
Jennifer Driscoll
------------------------------- MarkShnier__You2 years agoQrew Legend
I only posted one formula above. That whole thing is one formula. Please use th whole formula and if you have a syntax error, please post a copy and paste of your formula so we can debug it.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- JenniferDriscol2 years agoQrew Member
I got It! Thank you so much. Can I also get the year/month/day formula for my older kids?
------------------------------
Jennifer Driscoll
------------------------------- MarkShnier__You2 years agoQrew Legend
try this
var date MyDate = [My date];
var text Years = ToText(Year(Today())-Year($MyDate) -
If( Month(Today())<Month($MyDate)
or
(Month(Today())=Month($MyDate) and Day(Today())<Day($MyDate)),1,0));
var text Months = If(
Month(Today()) > Month($MyDate), ToText(Month(Today()) - Month($MyDate)),
Month(Today()) = Month($MyDate) and Day(Today()) >= Day($MyDate), ToText(Month(Today()) - Month($MyDate)),
Month(Today()) = Month($MyDate) and Day(Today()) < Day($MyDate), "11",
ToText(12-(Month($MyDate) - Month(Today()))));
var text DaysDisplay = If ( Day(Today()) > Day($MyDate), ToText( Day(Today()) - Day($MyDate) ),
Day(Today()) = Day($MyDate), "0",
Day(Today()) < Day($MyDate), ToText( Day($MyDate)-Day(Today()) ));
var text RawResult=$Years & " Year" & If ($Years <> "1","s","") & "<br>" &
$Months & " Month" & If($Months<>"1","s", "") "<br>" &
$DaysDisplay & " Day" & If($DaysDisplay<>"1","s", "");
$RawResult
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- JenniferDriscol2 years agoQrew Member
It keeps telling me that a semi colon is needed and the bold expression is highlighted
var text RawResult=
$Years & " Year" & If ($Years <> "1","s","") & "<br>" &
$Months & " Month" & If($Months<>"1","s", "") "<br>" &;
$DaysDisplay & " Day" & If($DaysDisplay<>"1","s", "");
$RawResult
------------------------------
Jennifer Driscoll
------------------------------
Related Content
- 3 months ago
- 3 months ago
- 9 months ago
- 4 months ago
- 3 months ago