Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with Date function

2 views
Skip to first unread message

Patrick Jackman

unread,
Mar 15, 2010, 4:10:29 PM3/15/10
to
In VBA the following will yeild the last day of the current month:

dtmLDM = DateSerial(Year(Date), Month(Date) + 1, 0)

How can you accomplish the same thing in T-SQL?

Patrick
=-=-=-=-=-=-=-=-=-=-=-=-=-
Patrick Jackman
Vancouver, BC


Jeff Boyce

unread,
Mar 15, 2010, 5:05:53 PM3/15/10
to
You might find more folks able to help if you post this to a SQL-related
group...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Patrick Jackman" <pjackman at wimsey no spam com> wrote in message
news:exA2RuH...@TK2MSFTNGP06.phx.gbl...

Sylvain Lafontaine

unread,
Mar 16, 2010, 11:33:03 PM3/16/10
to
A little googling would have helped you:
http://www.sql-server-helper.com/functions/get-last-day-of-month.aspx .

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)


"Patrick Jackman" <pjackman at wimsey no spam com> wrote in message
news:exA2RuH...@TK2MSFTNGP06.phx.gbl...

Patrick Jackman

unread,
Mar 17, 2010, 1:51:26 AM3/17/10
to
Thanks guys. The sqlserver.newusers group volunteered a couple of great
solutions. I'll keep that SQL Server Helper site for future reference though
Sylvain.

Patrick.

"Patrick Jackman" <pjackman at wimsey no spam com> wrote in message
news:exA2RuH...@TK2MSFTNGP06.phx.gbl...

0 new messages