How to display 6 days, 29 months, today, etc
Hi experts,
Been trying to figure out how to display 6 days, 29months, 1 month in result but couldnt figure out how. I searched in the internet and it gives me the idea of using add_months().
However, im not sure how am i gonna use it on my end.
For example,
Last login date was September 5, 2012. Then it should display 2 months. im not sure how to implement it on a query.
oracle version:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - ProductionLet me know if you need more info.
regards,
j
hi,
thanks for your response.
This is my query
select us.n_unitid
, u.c_externalid
, us.c_unitname
, (select to_char(sysdate,'MM') - to_char((to_date(max(d_date),'dd/mm/yyyy')),'MM') from dual) -- your query
, (select (to_char(max(d_date), 'dd.mm.yyyy'))
from userstats
where n_unitid = us.n_unitid) "Letzter Login Date"
, (select count(*)
from userstats
where n_unitid = us.n_unitid) "Logins"
from userstats us, unit u
where us.n_unitid = u.ip_unitid
and u.nf_statusid = 1
and us.n_groupid = 97
group by us.n_unitid, u.c_externalid, c_unitname;how would I add your query to my query? sorry if im asking so many questions.. you are using dual here. How would i get the d_date value from userstats table?
Thanks.
Similar Messages
-
How to display only Day value instead of DATE in Bex Report
Hi Experts,
We have a Month to date Report, in this report we need to display only day value instead of DATE value,
Like
if Date is 14.05.2010 we need to show only 14
Regards,
ChandraHi ,
Thanks for Quick Response
we does have the option to create the char(calday or ...) value variable replacement with char (calday or ...) info object, we can replace with Report r variable value only not with info object.
i hope we can replace the with info object only with formula variable with replacement.
My BEx Report is Designed like
Columns
0Calday
Rows
Plant
Keyfigures
Actual
Plan
Report output Looks like month to date
0CALDAY 01.06.2010 02.06.2010 03.06.2010
P1 ACTUAL 10 8 4
P1 PLAN 15 6 2
P2 ACTUAL 5 10 7
P2 PLAN 4 8 3
Report should be
0CALDAY 1 2 3
P1 ACTUAL 10 8 4
P1 PLAN 15 6 2
P2 ACTUAL 5 10 7
P2 PLAN 4 8 3
please let me know how can i achive this
Regards
Chandra -
How to display Current Year and Month in Drop Down list
Hi Dear friends,
I am devloping a report. It has got 2 pages--input and output(Report) page.
IN input page, user will select Month and Year from drop down list as one of the input parameters. (seperate drop down list 4 month and year)
Now, my problem is:
HOw to display current month and year by default in the dropdown list...........
I hope my question is clear.
Please help.
Regards,
AShNO da,
it is not working.
First i tired with for-loop. I initialized variable "i" to -2 (i=-2) I would get the year drop down list from 2003 but, by default 2003 would come.
So, i posted the question.
I tried your code. It is giving following error.
A Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occured between lines: 122 and 127 in the jsp file: /test/inpt.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:182: Invalid type expression.
first.set(Calendar.YEAR, 2003)
^
An error occured between lines: 127 and 131 in the jsp file: /test/inpt.jsp
Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:186: Invalid declaration.
out.write("\r\n \r\nYear : \r\n \r\n"); ^ An error occured between lines: 198 and 203 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:282: Invalid type expression. first1.set(Calendar.YEAR, 2003) ^ An error occured between lines: 203 and 207 in the jsp file: /test/inpt.jsp Generated servlet error: C:\Program Files\Apache Tomcat 4.0\work\localhost\general\test\inpt$jsp.java:286: Invalid declaration. out.write("\r\n \r\nYear :\r\n \r\n");
^
4 errors
Pls. Help.
Regards,
Ashu -
How to display dates in half-months?
How can I display dates in half-months from dim_date table? like shown below:
Assume that 8/14/2012 is current date..
07/15 - 07/30 - no. of opties created between those dates
07/01 - 07/14 - no. of opties created
06/15 - 06/30 - ...
06/01- 06/14 - ...
How can display the dates in those buckets? Any ideas appreciated.
Thanks in adv.Try to build the same in RPD using the below sql.
I've created a Flag based on W_DAY_D."DAY_OF_MONTH" <= 14 then 'F' else 'S' end
in answers I've got min and max based on exp: min(Time."Row Wid" by Time.Flag)
WITH
SAWITH0 AS (select distinct T31328."PER_NAME_MONTH" as c1,
case when T31328."DAY_OF_MONTH" <= 14 then 'F' else 'S' end as c2
from
"W_DAY_D" T31328 /* Dim_W_DAY_D_Common */
where ( T31328."PER_NAME_YEAR" = '2012' ) ),
SAWITH1 AS (select min(T31328."ROW_WID") as c1,
max(T31328."ROW_WID") as c2,
case when T31328."DAY_OF_MONTH" <= 14 then 'F' else 'S' end as c3
from
"W_DAY_D" T31328 /* Dim_W_DAY_D_Common */
where ( T31328."PER_NAME_YEAR" = '2012' )
group by case when T31328."DAY_OF_MONTH" <= 14 then 'F' else 'S' end )
select distinct SAWITH0.c1 as c1,
case when SAWITH0.c2 is not null then SAWITH0.c2 when SAWITH1.c3 is not null then SAWITH1.c3 end as c2,
SAWITH1.c1 as c3,
SAWITH1.c2 as c4
from
SAWITH0 full outer join SAWITH1 On SAWITH0.c2 = SAWITH1.c3
Hope this helps, pls mark -
How to display particular day of a week?
Hi experts,
I need to display a report date wise in query designer and i have to display only wednesday data. For eg:
Date Volume Sales
06.08.2014 25 234
13.08.2014 16 121
20.08.2014 45 987
Can anyone please help me out, how to achieve this.
The selection screen contains date period. Generally user provide one month interval. From this range i need to display only wednesday data.Hi,,
Can you try this:-
-> Create a customer exit and user input type variable for the your calday.
-> In Istep 2: modify this exit variable values
you need to restrict only the dates those are needed. you can find teh relevant date using
FM CALL FUNCTION 'DATE_COMPUTE_DAY' to find your day and the date
hope this will help.
regards,
Sakthi -
How to display the day of the week?
I can use the TODAY() function to display today's date, and I can format the cell with inspector to manipulate how to show the date, but how can I show only what the DAY of the week it currently is?
The problem with these two responses is that they are language dependant.
It would be useful to add a WEKDAYNAME() function which will return names according to the language in use.
Here is a workaround:
=LEFT(B,SEARCH(" ",B)-1)
It just assumes that B contains a date with dayname at the beginning.
Yvan KOENIG (from FRANCE mercredi 3 décembre 2008 22:05:06) -
How to display current day(13-nov-06) in selection screen-its very urgent
hi all,
iam sending code to change the date from mm/dd/yyyy to dd-mon-yy(10-nov-06).my requirement is i have to keep a parameter and when iam executing thid report say p_text1 is a parameter when iam executing this report in selection screen it has to show 12-nov-06 say current date.any body can suggest me how to do and please send me the sample code.
iam sending the code to change the date format as below.
data: begin of itab occurs 0,
SPRAS type SPRAS,
MNR LIKE T247-MNR,
KTX LIKE T247-KTX,
LTX LIKE T247-LTX,
end of itab.
DATA : month LIKE T247-MNR.
DATA: YEAR(4).
DATA: FINAL(18).
DATA: DAY(2).
DAY = sy-datum+6(2).
MONTH = sy-datum+4(2).
YEAR = sy-datum+0(4).
DAY = sy-datum+6(2).
YEAR = sy-datum+0(4).
select SINGLE * from t247 into itab where mnr = month
AND SPRAS = 'E'.
APPEND ITAB.
CONCATENATE DAY ITAB-KTX YEAR+2(2)
INTO FINAL SEPARATED BY '-'.
WRITE: FINAL.
thanks,
maheedhar.Tkeep this entire code in INITIALIZATION EVENT.
data: begin of itab occurs 0,
SPRAS type SPRAS,
MNR LIKE T247-MNR,
KTX LIKE T247-KTX,
LTX LIKE T247-LTX,
end of itab.
DATA : month LIKE T247-MNR.
DATA: YEAR(4).
DATA: FINAL(18).
DATA: DAY(2).
parameters: p_date type char15.
initialization.
DAY = sy-datum+6(2).
MONTH = sy-datum+4(2).
YEAR = sy-datum+0(4).
DAY = sy-datum+6(2).
YEAR = sy-datum+0(4).
select SINGLE * from t247 into itab where mnr = month
AND SPRAS = 'E'.
APPEND ITAB.
CONCATENATE DAY ITAB-KTX YEAR+2(2)
INTO P_DATE SEPARATED BY '-'. -
How to display balance days for annual leave in payslip report
hi all,
cn sm1 let me know how i can display the leave balance days of each employee on their payslip.
please let me know the tables where i can find the info of the employee annual leave days balance.
The leave defined is decreasing.
Plz i need your assistance gurus.
All comments are welcomed!No one out there to response buddies?
-
How to get Current day and month value in Stk applets
Friends please provide me the hint to get the Current Value of month and date from the Mobile equipment(ME).
please send feedback to [email protected]Use "PROVIDE LOCAL INFORMATION" command as per GSM 11.14. This however queries the handset date and time, and hence depends on the handset clock (which may not always be reliable).
-
How to display contineous 10 dates from today date using SQL query
Hi All
I need a requirement of displaying 10 dates and numbers contineously, I have written a query for getting 10 numbers like this
select rownum from dual where rownum < 10 connect by rownum = level;
But i am not able to get the dates, Can any one help me ?Hi Satyaki,
No issues on my 9.2.0.8 client.
SQL*Plus: Release 9.2.0.8.0 - Production on Sat May 3 09:49:17 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn test/test@db10g
Connected.
SQL> select rownum, trunc(sysdate) + rownum from dual where rownum <= 10 connect by rownum = level;
ROWNUM TRUNC(SYS
1 04-MAY-08
2 05-MAY-08
3 06-MAY-08
4 07-MAY-08
5 08-MAY-08
6 09-MAY-08
7 10-MAY-08
8 11-MAY-08
9 12-MAY-08
10 13-MAY-08
10 rows selected.
SQL> Regards -
How to display all dates of month in oracle forms..pl send full code
hai every one.
i have multiple rows of block.
i want to display all dates in that block.Hello,
+1. Complete Forms Solution described in the Dynamic poplist in a multi-record item. thread.+
This solution is based on dynamic list population with appropriate predefined record group (the number of such predefined record groups could be rather big --> 1 Continents*Countries.+
Record Groups can be totally dynamic, so you don't need to have them pre-existing at runtime.
Francois -
How to Display Number of Rows Deleted/Inserted etc... in PL/SQL
In Oracle 10g PL/SQL, I have a delete statement in a stored procedure. It is not in a cursor. I want to see the number of rows I've deleted. I can use the dbms_output.put_line package. I should know this, but I don't have time to perfect the syntax. How would I get the number of rows that get deleted and display it via dbms_output.put_lline?
No time to google either I guess.
http://www.google.co.uk/search?q=number+of+rows+deleted+oracle&rls=com.microsoft:en-gb&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1&rlz=&redir_esc=&ei=Qi5qToGyGYqw8QOGzf3nAg
SQL> create table dt_del_ex(id number);
Table created.
SQL> set serveroutput on
SQL> BEGIN
2
3 INSERT INTO dt_del_ex VALUES(1);
4
5 DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows inserted');
6
7 INSERT INTO dt_del_ex select rownum from dual connect by level <=10;
8
9 DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows inserted');
10
11 UPDATE dt_del_ex SET id = id + 3 WHERE id >= 9;
12
13 DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows updated');
14
15 DELETE FROM dt_del_ex WHERE id <= 10;
16
17 DBMS_OUTPUT.put_line(TO_CHAR(SQL%ROWCOUNT)||' rows deleted');
18
19 END;
20 /
1 rows inserted
10 rows inserted
2 rows updated
9 rows deleted
PL/SQL procedure successfully completed. -
How to Get days of Month in SSRS
How can I get days of Month in SSRS report...?
Hi RedZinc,
You can do it by writing a SQL query to generate days of month. For doing recursive to generate days,
Use CTE with recursive logic:
Declare @StartDate as DATE, @EndDate as DATE;
SET @StartDate = CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(GETDATE())-1),GETDATE()),101)
SET @EndDate = CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,Getdate()))),DATEADD(mm,1,Getdate())),101)
;WITH cte AS (
SELECT @StartDate AS myDate
UNION ALL
SELECT DATEADD(Day,1,myDate)
FROM cte
WHERE DATEADD(Day,1,myDate) <= @EndDate
Select * from CTEtested the above sql code and it is working. CTE will be easy to implement recursive stuff.
Maruthi... http://www.msbimaru.blogspot.com/ -
TZ of Day/Week/Month View is US/Pacific - Info Box & System TZ US/Eastern
Just noticed this - don't think its been happening for long - probably a couple of days at the worst.
When I create a New Event, the Time Zone is automatically incorrectly set to US/Pacific. I change it to Eastern (via Info Box) and it displays in the Info Box as Eastern, but the Daily/Weekly/Monthly view seems to remain at US/Pacific. (System prefs set to Eastern TZ).
In addition ALL my events display in Day/Week/Month view as US/Pacific TZ, even tho Info Box TZ (and system TZ) is US/Eastern.
For Example: Info box says event starts at 5PM goes to 9PM, Time Zone is US/Eastern. Calendar Display in Day, Week or Month shows event from 2PM to 6PM.
This has affected every one of my events.
I am running OSX 10.4.9,build 8P135 iCal Version 2.0.5 (1069)
iCal Support for Time Zones turned On.
Date/Time System Preferences appear to be OK
System Time (measured by Menu Clock and verified by save time on a file) is OK - (Am writing this at about 2:40PM EST, Sunday 6/3/2007.
Here's my Software Update.log
2007-05-15 23:43:37 -0400: Installed "Java 1.3.1 and 1.4.2 Release 2" (2.0)
2007-05-15 23:44:19 -0400: Installed "iTunes Phone Driver" (1.0)
2007-05-15 23:44:42 -0400: Installed "X11 Update 2006" (1.1.3)
2007-05-15 23:45:15 -0400: Installed "QuickTime" (7.1.6)
2007-05-15 23:46:24 -0400: Installed "Security Update 2007-004 (PowerPC)" (1.1)
2007-05-16 00:51:49 -0400: Installed "J2SE 5.0 Release 4" (4.0)
2007-05-16 01:21:55 -0400: Installed "Java for Mac OS X 10.4, Release 5" (5.0)
2007-05-31 01:21:19 -0400: Installed "Security Update (QuickTime 7.1.6)" (1.0)
2007-05-31 01:23:41 -0400: Installed "Security Update 2007-005 (PowerPC)" (1.1)
2007-05-31 01:24:42 -0400: Installed "iTunes" (7.2)
Looked in various logs but didn't see anything that seemed suspicious to me.
Help or suggestions about where to look to uncover solution to this mess appreciated.
Mini - 1.42 Mac OS X (10.4.9) 1Gig (self installed)It was US/Pacific -
I just changed it to US/Eastern and everything seems to work correctly now. I never even noticed that setting before - I guess I may have reset it by accident?
I see you're from Bristol, UK. A friend told me a few hours ago that he has to make a business trip there sometime this summer and was thinking about bringing his family (from Boston, USA). We were not too clear on English geography tho - is Bristol a decent family vacation destination?
Mini - 1.42 Mac OS X (10.4.9) 1Gig (self installed) -
please tell me how to get total days in month by calendar:
suppose i pass these parameters in calendar:=
Calendar c1=new GregorianCalendar(2005,1,6);
means it is feb 2005
now i want to find the No of days in current month:
it should give 28 .
please tell how to get.progarmatically i know.
i want APIHi,
I don't know if you got it working or not, but I was looking for the same thing and I found the following at this address
http://javaalmanac.com/egs/java.util/GetDaysInMonth.html
// Create a calendar object of the desired month
Calendar cal = new GregorianCalendar(1999, Calendar.FEBRUARY, 1);
// Get the number of days in that month
int days = cal.getActualMaximum(Calendar.DAY_OF_MONTH); // 28
// Try month in a leap year
cal = new GregorianCalendar(2000, Calendar.FEBRUARY, 1);
days = cal.getActualMaximum(Calendar.DAY_OF_MONTH); // 29
Maybe you are looking for
-
Forwarding Exchange calendar invites from calendar app not working
We have Samsung Windows 8 phones and have discovered a problem with forwarding calendar invitations from within the calendar app on Exchange 2010 / ActiveSync. User A on Exchange 2010 will create a new meeting request and send it to user B. User B wi
-
Why are random spaces being inserted in text on Acrobat Pro 9?
My apologies if this has been asked & answered before. I did try and search and found some information but I still do not understand the complete picture. I am a relatively new user to Acrobat and used 7 prior to upgrading to Pro 9 recently. I am us
-
Has anybody tried installing Developer2000 Client (Forms4.5 & Reports2.5) on Windows XP? Is it compatible? Are there any problems?
-
Hi, Everyone, I am trying to use the lag function for a particular purpose. But i am not able to achieve what i want. Below is an example what is need to acheive using the lag function. Account_number cat_desc pr_code product_desc datetime 999999 Fre
-
DESCRIPTIVE FLEXFIELD SECURITY
Hello Please Navigate to Payables-Setup-Flexfields-Validation-Security-Define I tried to put security on my DFF invoice but i cannot do so using 'Define Security Rules' window. how can i add security on my dff? that it should be used by certain respo