[QUOTE=Giblet535;31348]Yep.
Note that you can also use SQL whether the data is saved or not. SELECT works with provided values much faster than it does with db data. Sometimes, SQL makes a decent calculator.
SELECT YEAR({age_now}) - YEAR({dob}) - (DATE_FORMAT({age_now},
‘%m%d’) < DATE_FORMAT({dob}, ‘%m%d’)) AS Age;
That will compensate for leap year babies.
I would do it with PHP, myself. StackExchange will show you how. I’m not sure I’d count on SC macros for anything that isn’t 100% ScriptCase functionality. Date math isn’t ScriptCase functionality.[/QUOTE]
you are right, but also to use that statement in events you will need macro i guess, something like sc_lookup and thats why i asked the question above, using php and regular sql stuff with SC sometimes is irritating and confusing unless you tried similar thing in sc before and worked…
do you have any simpler idea how to use regular mysql or php stuff without using sc macros? please share your thoughts with us if you have
thanks in advanced