यदि आप SQL सर्वर का उपयोग कर रहे हैं,
dateadd(DAY,0, datediff(day,0, created))
बनाया गया दिन लौटाएगा
उदाहरण के लिए, यदि बिक्री '2009-11-02 06:12:55.000' को हुई,dateadd(DAY,0, datediff(day,0, created))
वापसी '2009-11-02 00:00:00.000'
select sum(amount) as total, dateadd(DAY,0, datediff(day,0, created)) as created
from sales
group by dateadd(DAY,0, datediff(day,0, created))