View previous topic :: View next topic
|
Author |
Message |
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
i want to get week day or week number from a system date in MM/DD/YY format thru easytrieve. Please let me know ASAP if any one has any idea about it. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Gprerna,
You can use following query in your ezt pgm
Code: |
SELECT WEEK( CURRENT DATE)
FROM SYSIBM.SYSDUMMY1; |
|
|
Back to top |
|
|
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
can we code SQL's in a ezt? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, if your shop has DB2 and you have access to it. |
|
Back to top |
|
|
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
Can we convert system date into week day or week number without using SQL? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You could write code to do this . . . Instead, i'd suggest you talk with others at your location and see if there is already a callable module you could use.
If you have this requirement, others have most likely had to do the same thing previously. |
|
Back to top |
|
|
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
No we dont have access to it
Do you have any idea how i can do it? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
gprerna wrote: |
No we dont have access to it |
What is "it"?
gprerna wrote: |
Do you have any idea how i can do it? |
Find out what the base data is and use that information to create the "modulus" you need. |
|
Back to top |
|
|
gprerna
New User
Joined: 21 Mar 2007 Posts: 38 Location: US
|
|
|
|
I mean, how can i convert date to week day or a week number with using SQL. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You can get the "week" or the "dayofweek" (or a whole bunch of other date/time values) using the suggestion Ekta posted in response to your original query. |
|
Back to top |
|
|
|