date as parameter in sql query and today

2 views (last 30 days)
Derik
Derik on 30 Mar 2012
Hello, I'm trying to use the date as parameter in a sql query in matlab I tried several possibilities but must be missing something in formatting... The date format in sql table is yyyy-mm-dd. It would be something like: result=extract(inputdate) conn = database('DB','',''); string = 'select * from Database where P_Date<inputdate' etc
As an alternative, I would like to do the same with something like today() in excel, e.g. result=extract(inputdate) conn = database('DB','',''); string = 'select * from Database where P_Date<today' etc Thank you very much in advance D.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!