Access SQL query 샘플들

less than 1 minute read

DateTime을 Date / Time으로 분리

SELECT REGDATE, Int(REGDATE) AS ONLY_DATE, REGDATE-Int(REGDATE) AS ONLY_TIME FROM WeatherData;

http://webcheatsheet.com/SQL/access_functions/dateadd.php

http://www.techonthenet.com/access/functions/date/dateadd.php

DateAdd function

DateAdd( interval, number, date)

interval : yyyy Year q Quarter m Month y Day of the year d Day w Weekday ww Week h Hour n Minute s Second

date : now(), regdate… etc

dateadd(“n”, 10, ‘2012-01-01 01:50’)