How does Max() actually work? MSDN says it works on datetime fields, is there something I am missing?
tblSent :
ID1(Identity) | ID2(Integer) | SentDate(DateTime)
1 2 2005-03-22 10:27:25.000
1 2 2005-04-06 10:27:09.000
SELECT MAX(CONVERT(varchar, SentDate, 103)) as SentDate FROM tblSent
WHERE ID1 = 1
AND ID2 = 2
gives
SentDate
22/03/2005
Why is this?
Thanks for replies
tblSent :
ID1(Identity) | ID2(Integer) | SentDate(DateTime)
1 2 2005-03-22 10:27:25.000
1 2 2005-04-06 10:27:09.000
SELECT MAX(CONVERT(varchar, SentDate, 103)) as SentDate FROM tblSent
WHERE ID1 = 1
AND ID2 = 2
gives
SentDate
22/03/2005
Why is this?
Thanks for replies