On 5/10/2011 8:46 AM, Stephen Russell wrote:
> Start is now in the statement and builds up through the iterations of
> the date math.
>
>
> SELECT DAY( DATEADD                                        --<<  4.
> Extract the last day
>             ( DAY, -1,                                   --<<  3. Find
> last day of current month
>                 DATEADD(MONTH,1,                           --<<  2.
> Find first day of next month
>                         CAST( CAST(                        --<<  1.
> Find first day of the current month
>                             YEAR(CURRENT_TIMESTAMP) AS VARCHAR(04))
>                             + RIGHT( ('0' +
> CAST(MONTH(CURRENT_TIMESTAMP) AS VARCHAR(02))) , 2 )
>                             + '01' AS DATETIME)
>                         )
>             )
>             )
>
>


Oh I'm so glad that that's so clear and easy to understand.  LOL

-- 
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
http://fabmate.com
http://twitter.com/mbabcock16

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to