This content has been marked as final.
Show 5 replies
-
Re: help with dates in SQL
Sunny Talwar Aug 7, 2017 8:47 PM (in response to Josephinet Tedesco)May be this
aaa:
SQL SELECT *
FROM Cccc.dbo.[vwdr_ppDays]
where ScheduledDate >= '2016-01-01' and ScheduledDate < (SYSDATE + 30);
-
Re: help with dates in SQL
Sasidhar Parupudi Aug 7, 2017 9:13 PM (in response to Josephinet Tedesco)Let vDate ='Date (Floor (Today ())+30),''YYYY-MM-DD'')'
In the sql where condition,
ScheduledDate<'$(vDate)'
hth
Sasi
-
Re: help with dates in SQL
Josephinet Tedesco Aug 7, 2017 10:46 PM (in response to Sasidhar Parupudi)Let vDate ='Date(Floor(Today())+30),''YYYY-MM-DD'')';
on using debug this s gives vDate as :"Date(Floor(Today())+30),'YYYY-MM-DD')"
and causes a problem when trying to use it.
Let vDate =Date(Floor(Today())+30); this gives the vDate as 7/09/2017 but then the problem is that it is in the wrong format.
Jo
-
Re: help with dates in SQL
Sasidhar Parupudi Aug 7, 2017 11:59 PM (in response to Josephinet Tedesco)Try
Let vDate =Date(Floor(Today())+30,'YYYY-MM-DD');
-
Re: help with dates in SQL
Josephinet Tedesco Aug 8, 2017 12:45 AM (in response to Sasidhar Parupudi)Thank you that worked! Where could I have found information about how to worked with dates as text???
-
-
-