Can anyone tell me how get which weekday it is for a given date through
SQL query or any other way.
Thanks in advance..
Hiren Chandrakant Shah.
Infosys Technologies Ltd.,
Bangalore - 560100.
cell : (+91) 94485 24261.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
Regards
Ravi
CGI
SELECT CURRENT_DATE AS "CURRENT DATE",
CASE DAYS(CURRENT_DATE) - ((DAYS(CURRENT_DATE)/7)*7) + 1
WHEN 1 THEN 'SUNDAY'
WHEN 2 THEN 'MONDAY'
WHEN 3 THEN 'TUESDAY'
WHEN 4 THEN 'WEDNESDAY'
WHEN 5 THEN 'THURSDAY'
WHEN 6 THEN 'FRIDAY'
WHEN 7 THEN 'SATURDAY'
ELSE 'ERROR'
END AS "DAY OF THE WEEK"
FROM SYSIBM.SYSDUMMY1
Paul.
Hiren Chandrakant
Shah
<Hiren_Shah02@INF To
OSYS.COM> TSO-...@VM.MARIST.EDU
Sent by: TSO REXX cc
Discussion List
<TSO-...@VM.MARI Subject
ST.EDU> How to Get weekday for a particular
Date
17/11/2004 02:40
PM
Please respond to
TSO REXX
Discussion List
<TSO-...@VM.MARI
ST.EDU>
Hi all,
************************************************************
Opinions contained in this e-mail do not necessarily reflect
the opinions of the Queensland Department of Main Roads,
Queensland Transport or Maritime Safety Queensland, or
endorsed organisations utilising the same infrastructure.
If you have received this electronic mail message in error,
please immediately notify the sender and delete the message
from your computer.
************************************************************
SAY DATE('W',04322,'J')
SAY DATE('W','17/11/04','E')
If you have an other date-format look at the function DATE.
Daniel
Hiren Chandrakant Shah <Hiren_...@INFOSYS.COM>
Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
17.11.2004 05:40
Please respond to
TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
Subject
How to Get weekday for a particular Date
Hi all,
*****Disclaimer*****
This message is for the addressee only and may contain confidential or privileged information. You must delete and not use it if you are not the intended recipient. It may not be secure or error-free. All e-mail communications to and from the Julius Baer Group may be monitored. Processing of incoming e-mails cannot be guaranteed. Any views expressed in this message are those of the individual sender. This message is for information purposes only. All liability of the Julius Baer Group and its entities for any damages resulting from e-mail use is excluded. US persons are kindly requested to read the important legal information presented at following URL: http://www.juliusbaer.com/maildisclaimer
You can pass a STANdard date in YYYYMMDD format and REXX will give you back
the day of the week:
say date("WEEKDAY","20040315","STAN")
Returns "Monday".
Hope that helps,
Dave Salt
Soft-Center Solutions Inc.
http://www.soft-center.com
1-877-SoftCen
Bringing you SimpList(tm) - The easiest, most powerful way to surf a
mainframe!
Isaac Yassin