Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2005, 12:32 AM
Registered User
 
Join Date: Jun 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default The Week Formula

Dears,
i need your support in how to create or modify a function so as to calculate the week based on a defined day name,
by other words
i'm the one who specifies the day name from which the week starts.

 
Old May 3rd, 2005, 01:07 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

HI,

If You are using MSSQL-SERVER you can use

SET DATEFIRST { number | @number_var }

Look books online for more infomation on SET DATEFIRST & @@DATEFIRST

Regards
Prashant




 
Old May 3rd, 2005, 01:09 AM
Registered User
 
Join Date: Jun 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear's
kinldy be adviced that i'm using oracle DB

 
Old May 3rd, 2005, 01:36 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 186
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To my knowledge you can only use Initialization Parameter
"NLS_TERRITORY" to set the first day of week






Similar Threads
Thread Thread Starter Forum Replies Last Post
DAY of the week wdepreter Excel VBA 3 February 7th, 2007 06:44 AM
Week Numbers ppenn Access VBA 2 January 4th, 2007 09:20 AM
My week with threads freezotic BOOK: Beginning Java 2 0 April 16th, 2004 04:27 PM
get the week from the given date Beulah ASP.NET 1.0 and 1.1 Basics 1 September 25th, 2003 11:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.