[dba-SQLServer] dba-SQLServer Digest, Vol 40, Issue 7

Robert L. Stewart rl_stewart at highstream.net
Mon Jun 19 13:53:48 CDT 2006


Darren,

I have a dimension table for date functions that I use.  It stores abut 200
years worth of dates.  It has each date broken down as completely as I can
think of.  The only thing that would need to change about it for your use would
be the fact that in the US, Sunday is the first day of the week, not the last.

Robert L. Stewart
The Dyson Group International
Software for the Non-profit Enterprise
Expanding your Sphere of Knowledge


Quoting dba-sqlserver-request at databaseadvisors.com:
> Date: Mon, 19 Jun 2006 13:03:43 +1000
> From: "Darren DICK" <darrend at nimble.com.au>
> Subject: [dba-SQLServer] Current Week in SQL
> To: <dba-sqlserver at databaseadvisors.com>
> Message-ID:
> 	<20060619030342.RTLF5695.omta02ps.mx.bigpond.com at DENZILLAP>
> Content-Type: text/plain;	charset="us-ascii"
>
> Hi all
>
> Is there an easy way to determine the date of the Monday in the current week
> -
> Also the same for the Sunday of the current week?
>
> E.g. - Assume today is Wednesday the 3rd April
>
> I need help to determine that Monday is the 1st April 2006 and Sunday would
> be
> the 7th April
>
> Just need to work our the Monday date and Sunday date of any week we are in
>
> Make sense?
>
> Many thanks
>
> Have a great day
>
> Darren





More information about the dba-SQLServer mailing list