MyNeckHurts
Programmer
I need to be able to pull data from a sql database for month to date and last full months data. I'm having an issue with date time. Here's an example of the sql where clause:
Where (((dbo_RMS_Roll30DAY_SALES_EXCH_DLY.TXN_DT) Between (Select FetchStartDate From FetchDateTable) AND (Select FetchEndDate From FetchDateTable))
The FetchEndDate and FetchStartDate are true dates as in 01/01/2005 and 01/31/2005. But the dbo_RMS_Roll30DAY_SALES_EXCH_DLY.TXN_DT is a date time. When the query runs it is missing days from the first day of the month and the last day of the month (most likely due to the date time issue).
Does anyone have an idea of how I can pull month to date and last full month without this date time issue?
Thanks!
Where (((dbo_RMS_Roll30DAY_SALES_EXCH_DLY.TXN_DT) Between (Select FetchStartDate From FetchDateTable) AND (Select FetchEndDate From FetchDateTable))
The FetchEndDate and FetchStartDate are true dates as in 01/01/2005 and 01/31/2005. But the dbo_RMS_Roll30DAY_SALES_EXCH_DLY.TXN_DT is a date time. When the query runs it is missing days from the first day of the month and the last day of the month (most likely due to the date time issue).
Does anyone have an idea of how I can pull month to date and last full month without this date time issue?
Thanks!