Hello, we send an email to our scheduling team at 10, noon and 2 to update them on how many appointments have been made that day. Between 2 and 6 we have more appointments and will count those the next day for our daily email under how many appointments were made yesterday. I am using:
select * from securitylog
where PermType='25' and DATEDIFF( d, logdatetime, GETDATE() ) = 1
But get an error on getdate(). I have seen this in several sql statements, however do not know if it is valid in the Open Dental SQL version. CURDATE() did not work, however works on appointments for today.
Another solution is to have a user prompt for the date, helpful on Mondays as we would want datediff=2 for Saturday apts.
Thanks
How many appointments yesterday?
-
- Posts: 8
- Joined: Tue Jun 08, 2010 1:56 pm
Re: How many appointments yesterday?
Solved problem. Using
date(logdatetime) = date(curdate()-1)
date(logdatetime) = date(curdate()-1)