×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Please Check the SQL Reference: The Add_Months and Last_Day scalar
functions.
Values(Add_Months(Last_Day(Current_Date), -1));
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von
Hoteltravelfundotcom
Gesendet: Thursday, 22.10 2015 17:57
An: Midrange Systems Technical Discussion
Betreff: Need simple SQL to get the last day of month of previous month
HI this code is not working on i.
select DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1, -1)
error Message: Token <END-OF-STATEMENT> was not valid. Valid tokens: + - AS
<IDENTI
What would be the syntax for such a select statement?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.