Forum Discussion
Anonymous
8 years agoNot applicable
sql server previous day data extraction query
Hi All,
I am trying to extract data of previous day from SQL server in Power BI.
The table from which I am extracting data has a column with name 'CreatedOn' and has date and time.
Can someone please help with the sql query to extarct data of only previous day?
Thanks
Shivam
- Anonymous8 years agoSelect
*
From
Table
Where
Datediff(d,cast(createdon as date),cast(getdate() as date)) = 1
1 Reply
- AnonymousNot applicableSelect
*
From
Table
Where
Datediff(d,cast(createdon as date),cast(getdate() as date)) = 1