Select a query using dates from a database in MS Access

조회 수: 6 (최근 30일)
Kyriaki Mylonas
Kyriaki Mylonas 2018년 4월 9일
댓글: Kyriaki Mylonas 2018년 4월 9일
Hello guys!
I have a database in Ms Access with records by dates and I want to import some of the data in matlab choosing a time period. To be more specific, here it's my code! Thank you in advance guys!!
But the data table remains 1x1 and 0. Can you help me?
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2018년 4월 9일
Kyriaki - what does dataquery look like? You have two local variables named startdate and enddate but how do you update your data query with these values? I suspect that you want to do
dataquery = sprintf('SELECT * FROM NEWDATA where #%s# < Dates < #%s#', startdate, enddate);
Next is the condition valid for querying between two dates? Don't you need to use BETWEEN instead?
Kyriaki Mylonas
Kyriaki Mylonas 2018년 4월 9일
Thank you for your answer I am going to try that right now!!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by