473,387 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

day of week from DATE function?

Hello,

Is there a way to get the day of the week from the DATE function or
any other function?

I need to know if a certain date is a Saturday or a Sunday.
I'm way under pressure here, so I appreciate if anyone replies fast,
and copies my email mairhtin at techsolutionsgroupllc dot com ...

Thanks in advance.

Mairhtin
Nov 12 '05 #1
4 39578
I think you may want DAYOFWEEK or DAYNAME (see Chapter 4 - Functions -
Scalar Functions of the SQL Reference) - or this URL if you have no
manuals:

http://publib.boulder.ibm.com/infoce...help/index.jsp

db2 values dayofweek('2004-03-03')

1
-----------
4

1 record(s) selected.
db2 values dayname('2004-03-03')

1

-------------------------------------------------------Wednesday
1 record(s) selected.
Mairhtin O wrote:
Hello,

Is there a way to get the day of the week from the DATE function or
any other function?

I need to know if a certain date is a Saturday or a Sunday.

I'm way under pressure here, so I appreciate if anyone replies fast,
and copies my email mairhtin at techsolutionsgroupllc dot com ...

Thanks in advance.

Mairhtin


Nov 12 '05 #2
There's also a thread in this newgroup around February 11-12 with the
subject "Calculating Business Days" - it has about 13 postings talking
about advanced logic in case the Oracle Stored Proc you're converting
does more than this.

Blair Adamache wrote:
I think you may want DAYOFWEEK or DAYNAME (see Chapter 4 - Functions -
Scalar Functions of the SQL Reference) - or this URL if you have no
manuals:

http://publib.boulder.ibm.com/infoce...help/index.jsp

db2 values dayofweek('2004-03-03')

1
-----------
4

1 record(s) selected.
db2 values dayname('2004-03-03')

1

-------------------------------------------------------Wednesday
1 record(s) selected.
Mairhtin O wrote:

Hello,

Is there a way to get the day of the week from the DATE function or
any other function?

I need to know if a certain date is a Saturday or a Sunday.

I'm way under pressure here, so I appreciate if anyone replies fast,
and copies my email mairhtin at techsolutionsgroupllc dot com ...

Thanks in advance.

Mairhtin



Nov 12 '05 #3
Thanks again, as ever, Blair. You're a CHAMP!

Mairhtin

Blair Adamache <ba*******@2muchspam.yahoo.com> wrote in news:c27d6h$862$1
@hanover.torolab.ibm.com:
There's also a thread in this newgroup around February 11-12 with the
subject "Calculating Business Days" - it has about 13 postings talking
about advanced logic in case the Oracle Stored Proc you're converting
does more than this.

Blair Adamache wrote:
I think you may want DAYOFWEEK or DAYNAME (see Chapter 4 - Functions -
Scalar Functions of the SQL Reference) - or this URL if you have no
manuals:

http://publib.boulder.ibm.com/infoce...help/index.jsp

db2 values dayofweek('2004-03-03')

1
-----------
4

1 record(s) selected.
db2 values dayname('2004-03-03')

1

-------------------------------------------------------Wednesday
1 record(s) selected.
Mairhtin O wrote:

Hello,

Is there a way to get the day of the week from the DATE function or
any other function?

I need to know if a certain date is a Saturday or a Sunday.

I'm way under pressure here, so I appreciate if anyone replies fast,
and copies my email mairhtin at techsolutionsgroupllc dot com ...

Thanks in advance.

Mairhtin




Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Funnyweb | last post by:
I have just notices that the date() function is not returning the correct date/time on my "server". I am running apache2 on my winxp pro laptop. My system clock is set to the correct date,...
3
by: Sharad Gupta | last post by:
Friends I need a date simple date function that would append the coming month value in my current month like monthname(month(date)) : gives me current month in string i need next month , a...
2
by: ltamisin | last post by:
Hi Im working on a Year(Date) function right now, the output of that function is this "2005", my question is how can i change the format into this "05" Function: Year(Date) Output: 2005...
8
by: Dennis M. Marks | last post by:
What is the maximum valid date range for the date(yyyy,mm,dd) function. -- Dennis M. Marks http://www.dcs-chico.com/~denmarks/ Replace domain.invalid with dcsi.net -----= Posted via...
5
by: Dennis M. Marks | last post by:
After reading section 15.9.1.1 the ECMAScript Language Specifications I see that the date range for the Date function is +/- 100,000,000 days from 01 Jan 1970. This is called an extrapolated...
4
by: Christine | last post by:
I am having the strangest problem. I use the Date function in several of my forms and modules in an Access 2000 mdb. Lately, wherever in my code (in this one mdb) I use the Date function, it...
4
by: Patrick McGuire | last post by:
I need to get the current date in vb .NET. In vba I always used the Date() function, and the help in .NET indicates that this function still exists, but I can't seem to find it. The Now()...
2
by: berry | last post by:
Hi all, I have another question now. How to get the whole week date if the user only key in a date. For example, the user choose 4June2007, then the program should search the date from sunday...
3
by: murch.alexander | last post by:
I made a simple public function to set and return a date value (see below). I have a number of queries that call up the function to get the "As Of Date," which is typically set to today's date....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.