Comparing datetime

Hi all,
I’m new to Asterisk, and i’m learning it piece by piece, one of things that i’m not able to do is to compare a datetime that i get from a DB with the system time…

if somebody can help with that it would be great.

Thanks in advance.

if Asterisk can’t do what you want with built-in or custom functions, why not write an AGI script in Perl or PHP ?

Hi baconbuttie
I don’t know if asterisk can do it or not, is there a place where i can see all the available functions so i can try them out?

Thanks.

at the CLI CLI> show functions

baconbuttie, Just got it to work

exten => s,3,MYSQL(Query resultid ${connid}\ SELECT\ field1\ from\ TableName\ where\ DATE_FORMAT(curdate(),’%Y-%m-%d\ %h:%i:%s %p’ )>\ DATE_FORMAT(DATE_ADD(DateTimeFieldInTheDB,\ INTERVAL\ ‘10:00’\ HOUR_MINUTE),’%Y-%m-%d\ %h:%i:%s\ %p’)

What this thing saying: Is now > 10:00 am on the DateTimeFieldinTheDB. if yes, it will bring back the value in field1, if not, it will be null.

Thanks for your help