i want to compare two date and time with each other and i want to select records that "StartTime" is greater than now time and the "StartDate" is greater than now date.
but output is not correct.thanks in advance. my tabale'records are:
StartDate StartTime
-------------------------------
1389/07/11 11:04
1389/06/23 21:17
1389/06/23 21:32
1389/06/23 22:10
1389/06/26 12:34
1389/06/27 17:29
1389/06/27 18:13
1389/06/27 20:27
1389/06/28 09:41
1389/07/18 10:46
1389/07/05 22:00
1389/07/15 24:00
output is: when the query is : (1)
SELECT StartDate, StartTime
FROM Proj
WHERE (StartDate < '1389/07/15 ') AND (StartTime <= '20:20 ')
StartDate StartTime
-------------------------------
1389/07/11 11:04
1389/06/26 12:34
1389/06/28 09:41
1389/07/18 10:46
output is: when the query is: (2)
SELECT StartDate, StartTime
FROM Proj
WHERE (StartDate > '1389/07/15 ') AND (StartTime >= '20:20 ')
StartDate StartTime
-------------------------------
NULL NULL
the correct output should be:
StartDate StartTime
-------------------------------
1389/07/18 10:46
i use persian date.