Get Todays Date
I am trying to write a query that will show me all the sales orders added for todays date (as in what ever the system date is currently).
I am not sure how to use the 'getdate' function and would appreciate guidence. This query will be used in an alert.
SELECT T0.[DocNum], T0.[CardCode], T0.[CardName], T0.[DocTotal], T0.[GrosGrofit], T2.[SlpName]
FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OSLP T2 ON T0.SlpCode = T2.SlpCode
WHERE T0.[DocDate] = getdate()
Dániel Omaisz Takács replied
if you want, what had been add-ed today
modify your where clause to
i usually use this, or you could cast/convert them as you desire, the main goal would be to cut out only the date
Hope this helps.