Function to get the date after substraction
Hi Gurus,
I understand that the function "RE_ADD_MONTH_TO_DATE" is used for calculate the date after added certain month(s).
But, how do I do it in the other way. What I mean here is I want to substract the date.
For example my current date is 09.05.2008, substract 3 years is 09.05.2005.
All ideas and suggestion are greatly appreciated.
Thanks.
Hi ,
u can use the same function module RE_ADD_MONTH_TO_DATE with passing months in negetive number like,
month = -36.
in the function module.
regards,
kk.
Similar Messages
-
Using analytic function to get the data
Hi
Version is 11g
My table has this data
NAME SALARY LAST_UPDA
a 1000 01-JAN-07
a 2000 01-JAN-09
a 2500 01-JUN-10
b 2000 01-AUG-10
c 5000 01-JUN-07
c 6000 08-JAN-09
c 4500 01-FEB-10
I want to pick the salary and name of the person when it was last updated (max(last_update_date)).
Couple of ways of doing this I think are
SELECT distinct name,
TRUNC(
AVG(salary) KEEP (DENSE_RANK LAST
ORDER BY TO_CHAR(last_update_Date,'YYYY') )
OVER (PARTITION BY NAME)
) t
FROM kmdebug;
OR
SELECT * FROM KMDEBUG
WHERE (LAST_UPDATE_DATE, NAME) IN (SELECT MAX(LAST_UPDATE_DATE), NAME
FROM KMDEBUG
GROUP BY NAME);
They give the desired result.
NAME SALARY LAST_UPDA
a 2500 01-JUN-10
b 2000 01-AUG-10
c 4500 01-FEB-10
But the problem with the first version is DISTINCT. I want to get result set without using DISTINCT
The problem with second version is, it could be inefficient way of doing it espeically when KMDEBUG table would be big.
Thank you
MSKA couple of thoughts.
1. 11g is not a version number.
SELECT * FROM v$version;2. Read the FAQ and learn how to use tags to format your listing so others can read it. (blue circular icon to the right)
3. Post DDL to create your table and DML to load your sample data.
Then, perhaps, someone can try your query and consider how to get you what you want.
And, when you make requests like "without using DISTINCT" you need to explain why. Because otherwise this just looks like someone trying to get us to do their homework for them. -
Can I use LabVIEW to load data directly into system memory from a VI? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Call Library function to read the data from the card and now I want it to go directly to system memory.
The data is being received at 1Mbps.
ThanksTwo questions:
One, if it's a serial card, then presumably it gives you more serial ports, like COM3, COM4, etc. If so, VISA would see the COM ports, and not the card directly. The drivers for the card should make it so that you see the extra serial ports from the OS. If you don't see the extra COM ports from VISA, then it sounds like the drivers for the card are not installed properly. Do the extra COM ports show up in Device Manager?
Two, you said that you're using a Call Library function to get the data and you want to put it into system memory. Errr.... you just read the data and you have it in memory by definition. Are you saying you need a way to parse the data so it shows up on a graph or something? -
I have a Mac Pro OS 10.7.5 and have a DVD+R disc with files on it, but it ejects the disk after about 10 seconds--what to do? How can I get the data off this disc? I can see it has been already burned, so files are on there?
Try cleaning the lens and see if that will restore functionality to the DVD drive. Use a DVD lens cleaning disk, if you have a can of compressed air, shoot some into the slot or wrap a fine microfiber cloth (eyeglasses cleaning cloth) around a business card and insert it gently inside the slot.
If no success, make an appointment at an Apple store genius bar and get a free diagnosis from them.
Ciao. -
I recently restored my iPhone 4s from back-up after being reset. An app that I had turned off in back-up did not show up in my recent resoration. I forgot to turn the app back on. Would there be any way I would be able to get the data from that app onto my phone? Is it possible to put an old back-up on my phone?
LukaPetranovic wrote:
Hello anita4323.
I hope this will help you with your problem:
Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
You can restore your backup whenever you want from iTunes or iCloud, depending where you made it.
Let us know if you succeeded or need any further help.
I believe you are missing the point. The OP has already restored from back up, but failed to include a specific app in the back up and is trying to recover data for it, which in this case is not possible. -
Function module to get the dates from the year and the period
Is there a function Module to get the dates from the year and the period
Check with :
To get last day of period use .
LAST_DAY_IN_PERIOD_GET.
To get last of month Use :
RE_LAST_DAY_OF_MONTH
HRVE_LAST_DAY_OF_MONTH
LAST_DAY_OF_MONTHS
ISB_PREVIOUS_PERIOD_DATE_GET
Thanks
Seshu -
I have the original AIR recently it has really slowed down. Every function usually gets the pinwheel. It is up to date and has 10g of free disk space. Any suggestions as to the cause?
Often a failed disk or power supply. See:
https://encrypted.google.com/search?q=%22time+capsule%22+%22orange+light%22&as_q dr=all&newwindow=1&num=100 -
Iam not getting the data on screen after using the user exit zxpadu01
Dear Freinds
As per my requirement when the user enters value Ansal it should get defaulted to Amount field (bet01 ) based on the wage type
i have written calculation ( q0008-bet01 = ansal/100) before it getting defaulted to bet01, i found that value is not getting default on the screen for bet01 once i enter value for Ansal , please any body correct my code
in ZXPADU02 i have written the code as below :
data : wa_p0008 like p0008,
i0008 like p0008,
l_v_ANSAL type ANSAL_15,
l_v_amount type PAD_AMT7S.
CASE innnn-infty.
when '0008'.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = wa_p0008. -- HERE I GOT ALL THE DATA EXCEPT BET01
if wa_p0008-lga01 = 'MFPY'.
l_v_ansal = wa_p0008-ansal.
l_v_amount = l_v_ansal / 100.
move l_v_amount to wa_p0008-bet01.
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = wa_p0008 --- HERE I CAN SEE EVEN THE BET01 IS FILLED
IMPORTING
prelp = innnn. --- HERE I CAN SEE LGART BUT NOT AMOUNT VALUE
endif.
when others.
endcase.
IN ZXPADU01 I HAVE WRITTEN AS BELOW:
data : wa_p0008 like p0008,
i0008 like p0008,
l_v_ANSAL type ANSAL_15,
l_v_amount type PAD_AMT7S.
CASE innnn-infty.
when '0008'.
MOVE-CORRESPONDING innnn to wa_p0008.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = wa_p0008.
if wa_p0008-lga01 = 'MFPY'.
l_v_ansal = wa_p0008-ansal.
l_v_amount = l_v_ansal / 100.
move l_v_amount to wa_p0008-bet01.
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = wa_p0008 --- I CAN SEE ONLY WHEN I COME AGAIN
IMPORTING
prelp = innnn.
endif.
when others.
endcase.
Now my problem is as follows :
i have entered the value for Ansal (ex: p0008-Ansal = 1000) ..........and i say enter then i should found the calculated value for the ansal through my coding
and it should display in bet01 as 10 ( q0008-bet01 = p0008-ansal /100)
but i dont find the value 10 being displayed for the field bet01 on the screen when
user enters Ansal as 1000 .........even then i have saved it to test the scenario......
now i came in displayed mode (pa20 ) for the infotype 008 for the same personnel no for the same dates .....where i created the record........i found that the value
bet01 is there i.e i can see the value bet01 as 10 ( my requiremnt here matching)
but when the user say enter during the time of creation of the record the value
bet01 is not getting defaulted with 10 .........why iam not able to understand
PLEASE ANY BODY HELP ME IN THIS REGARD
regards
shanti.Hi Pranesh,
i have used the logic which you hav given as below
in ZXPADU02
FIELD-SYMBOLS <fs> TYPE ANY.
ASSIGN ('(MP000800)Q0008-betrg') TO <fs>.
if <fs> is assigned.
<fs> = l_v_amount . --- amount as (ansal /100 i.e 1000/100 = 10) 10
endif.
still iam not getting the data for the field bet01
this is the coding i am using
data : wa_p0008 like p0008,
i0008 like p0008,
l_v_ANSAL type ANSAL_15,
l_v_amount type PAD_AMT7S.
FIELD-SYMBOLS <fs> TYPE ANY.
CASE innnn-infty.
when '0008'.
MOVE-CORRESPONDING innnn to wa_p0008.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = wa_p0008.
if wa_p0008-lga01 = 'MFPY'.
l_v_ansal = wa_p0008-ansal.
l_v_amount = l_v_ansal / 100.
move l_v_amount to wa_p0008-bet01.
ASSIGN ('(MP000800)Q0008-betrg') TO <fs>.
if <fs> is assigned.
<fs> = l_v_amount .
endif.
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = wa_p0008
IMPORTING
prelp = innnn.
endif.
when others.
endcase.
please help me as iam still not getting (value in bet 01) when i press enter once i enter value in ansal feild.
regards
shanti. -
Not able to get the data in COSB Table
Hi Colleagues,
I have created a Project and assign the WBS number to a Sales order and also have done all the settings in Result Analysis.
But still not able to get the data in COSB table.
Could you please suggest me the steps and process, Might be i have missed something..
Thanks in Advance
Regards
NitinHi Ken,
I have below mentioned requirement
COSB will show value by object number and need to pass the object number to PRPS table to find the corresponding WBS element and then pass the WBS element to VBAP table to find the corresponding SO line item.
Please let me know as Functional prospect what I have to do to bring this values in COSB table.
Regards
Nitin -
Not able to get the data from synchronous Webservice To BPEL process
Hi All,
My requirement is : Third party has some webservice.They are pushing data to that Webservice(Wsdl).
Third part WSDL example : http://ipaddress:port/name/Service.svc?wsdl ( This is just example format of their WSDL)
After that I need to get that data into my BPEL process and update my system.
When I built My Snchronous BPEL process I imported third party WSDL(http://ipaddress:port/name/Service.svc?wsdl) through 'import WSDL' in dialog.After that I automatically got the (request and response schema elements) parameters from that WSDL.I gave input and output of the BPEL process from those elements.
I pasted that third party URL iin SOAPUI and I got their operations and schemas.Based on that I had choosen the elements for 'input' and 'output' of the BPEL processes.I am also getting the schema structures in 'Assign' or 'Transform' activity.
I built the whole process.
I have the Process.
Now Client is pushing data to their WSDL(http://ipaddress:port/name/Service.svc?wsdl) as it is their data pushing interface.But that data is not coming to my BPEL process and instance is not being created in EM console.
As I have imported their WSDL into my BPEL process,I need to get the data.But I am not getting the data.
Is there any problem in MY BPEL process?
(or)
DO I need to use 'Webservice' Adapter in 'Exposed Services' Swimlane in Composite Editor to have the third party URL, so that they Can push the data to that WSDL in turn that data comes into my BPEL process?
Can anybody help me this case?
once again my requirement is :
Client pushes the data through their WSDL url -----> I need to get that data into MY BPEL process --> I have my own WSDl to take that details into my system.I will explain the requirement in small paragraph:
There are two applications.One is our application(X) and another one is third party application(Y).
I need to update in my application(X) based on data coming from application(Y).
I am using SOA as a middle tier to have communication between Y and X.
(Ex: if they send some info like event type 'event1' from Y ,I need to update that 'event1' data in my X application)
The work at third party application is :
According their info,They will push data from their end to their WSDL( http://ipaddress:port/name/Service.svc?wsdl ).
They are telling they can only send the data to their WSDL( http://ipaddress:port/name/Service.svc?wsdl ).
They will not consume our BPEL process(I think they might be wrong at this point of time).They have one WSDL to send or push the data from their end.
The work at from our side(SOA & X application)
From that point ,our BPEL process has to receive that data and update that data into my application(X).
I hope You understand my requirement.
Can you guide me through how to achieve this task as they are telling they have to use their WSDL to push the data?
(or)
Do I need to take 'Webservice' adapter into Exposed Services Swimlane in Jdeveloper to have their webservice(third party WSDL),If it is So Can you tell me the details how to take 'input' and 'output' for BPEL process?
(or)
Can YOu suggest me to talk to them to consume my BPEL process directly?
Thanks
Edited by: 899283 on Aug 17, 2012 4:55 AM -
Not able to get the data on the page
hi,
I tried brining the data on the JSP page. I am passing the parameters to a PL/SQL procedure. but I am not getting any data or error. can anyone helpme how to proceed further I am retreving the page parameters that are passed to the JSP page like this.
<%
PortletRenderRequest portletRequest = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
RenderContext rc = portletRequest.getRenderContext();
PortletDefinition pd = portletRequest.getPortletInstance().getPortletDefinition();
%>
I am getting the page parameters. but I am not able to get any result on the page.
while I am using the same code to get the data on another JSP page I am getting the data except I am not retreving the page parameters.
I am using the code like this to pass the parameters to the procedure.
OracleConnection conn__OCI = cpool.getProxyConnection(OracleOCIConnectionPool.PROXYTYPE_USER_NAME, proxUserProp);
cstmt = conn__OCI.prepareCall ("begin test.test1( ?,?,?,?,? ); end;");
cstmt.setString(2, cnumb);
cstmt.setString(3, cperiod);
cstmt.setInt(4, retStrC);
cstmt.setString(5, retStr3);
cstmt.registerOutParameter (4, Types.NUMERIC);
cstmt.registerOutParameter (5, Types.VARCHAR);
cstmt.registerOutParameter(1, OracleTypes.CURSOR);
cstmt.execute();
retStrC = cstmt.getInt (4);
retStr3 = cstmt.getString (5);
retStr = "<tr class=OraDataText><td> " + retStrC + "</td></tr>";
retStr = retStr + "<tr class=OraDataText><td> " + retStr3 + "</td></tr>";
if ( retStrC == -1 ) { ALLretStr = ALLretStr + retStr; }
else
cursor = ((OracleCallableStatement)cstmt).getCursor(1);
while (cursor.next ())
if (spacerLine >= 2)
ALLretStr = ALLretStr + "<tr><td colspan=5 height=1 <div id=ssubLine> <div id=ssubLinet></div> </div> </td></tr>";
ALLretStr = ALLretStr + "<tr class=smmjWipAltText><td ALIGN=LEFT>" + cursor.getString(1) + "</td><td ALIGN=CENTER>" + cursor.getInt(2) + "</td><td ALIGN=CENTER>" + cursor.getString(3) + "</td><td ALIGN=CENTER>" + cursor.getString(4) + "</td><td ALIGN=RIGHT>" + cursor.getString(5) + "</td></tr>";
spacerLine++;
}Hi Frank,<br>
<br>
I am getting a blank page after hitting the submit button. can you help me finding a solution for this in the JSP page or tell me where the error is. <br>
<br>
<%@page contentType="text/html;charset=UTF-8" %><br>
<%@page import="oracle.portal.provider.v2.render.*" %><br>
<%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %><br>
<%@page import="oracle.portal.provider.v2.PortletDefinition" %><br>
<%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %><br>
<%@page import="java.sql.*, javax.sql.*, java.util.*, oracle.jdbc.*, <br>
oracle.jdbc.pool.*, oracle.jdbc.oci.*" %><br>
<br>
<%<br> PortletRenderRequest portletRequest = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);<br>
RenderContext rc = portletRequest.getRenderContext();<br>
PortletDefinition pd = portletRequest.getPortletInstance().getPortletDefinition();<br>
%><br>
<%! String tree_descrip;<br> String tree_descrip_long;<br>
String curr_Scheme;<br>
String overl_gif;<br>
String curr_css_path;<br>
// page param<br>
String p_number_val= "1";<br>
String p_period_val= "Day";<br>
%><br>
<%<br> String long_desc = "LONG";<br>
String Descrip = "SHORT";<br>
String treeDescrip= "%SUBMISS%OLDER%";<br>
String curr_treeCateg = "SUB";<br>
try<br>
{<br>
curr_Scheme = getInfo.getSchem.getSchem();<br>
overl_gif = "/images/tested/"+curr_Scheme+ "images/prefreshdefault.gif";<br>
curr_css_path = "/images/tested/" curr_Scheme "css/param_jsp.css";<br>
tree_descrip = getInfo.getPortletTitle.getPortletTitle ( Descrip , treeDescrip , curr_treeCateg);<br>
tree_descrip_long = getInfo.getPortletTitle.getPortletTitle ( long_desc , treeDescrip , curr_treeCateg);<br>
}<br>
catch(Exception e)<br>
{<br>
tree_descrip = "";<br>
tree_descrip_long = "";<br>
}<br>
%> <br>
<% // Get page param p_number_val try { p_number_val = request.getParameterValues("p_number")[0]; } catch(Exception e) { p_number_val = "1"; } <br>
// Get page param p_period_val try { p_period_val = request.getParameterValues("p_period")[0]; } catch(Exception e) { p_period_val = "Day"; } %> <br>
<HTML> <HEAD> <link href="<%= curr_css_path %>" rel="stylesheet" type="text/css" media='' screen=''/> <SCRIPT LANGUAGE="JavaScript1.1" SRC="/images/smmj_page_obj/Popup/overlib.js"></SCRIPT> </HEAD> <BODY>
<TABLE WIDTH=100% summary="<%= tree_descrip %>" border="0" cellspacing="0" cellpadding="3" BGCOLOR="#FFFFFF" > <TR WIDTH="100%" height="6px"><td height="6px" COLSPAN="6" ></td></TR> <TR WIDTH="100%" > <td ALIGN="LEFT" nowrap ></td> <td ALIGN="LEFT" style="font-family:Verdana; font-size:8pt;font-weight:normal" nowrap class="smmjPort2HeadJS"> CYCLE NAME</td> <td ALIGN="CENTER" style="font-family:Verdana; font-size:8pt;font-weight:normal" nowrap class="smmjPort2HeadJS">ID</td> <td ALIGN="CENTER" style="font-family:Verdana; font-size:8pt;font-weight:normal" nowrap class="smmjPort2HeadJS">FIRM NAME</td> <td ALIGN="CENTER" style="font-family:Verdana; font-size:8pt;font-weight:normal" nowrap class="smmjPort2HeadJS">BILLING PERIOD</td> <td ALIGN="RIGHT" style="font-family:Verdana; font-size:8pt;font-weight:normal" nowrap class="smmjPort2HeadJS0">AGE</td> </TR> <%= getOlderSubs( p_number_val, p_period_val , "dev", portletRequest.getUser().getName(), "close_connect") %> </table> <TABLE><TR><TD> <%=p_number_val%>
<%=p_period_val%> <br>
<%=portletRequest.getUser().getName()%> </TD></TR> </TABLE> </BODY> </HTML> <br>
<%!<br> private String getOlderSubs( String cnumb, String cperiod, String cstring, String userid, String cState) throws SQLException
{<br>
CallableStatement cstmt;<br>
ResultSet cursor;<br>
int spacerLine = 1;<br>
int retStrC = 1;<br>
String retStr = "f";<br>
String retStr2 = "f";<br>
String retStr3 = "f";<br>
String retStr4 = "f";<br>
String ALLretStr = " ";<br>
String TempretStr = " ";<br>
String userstring = getInfo.getPortlUser.getPortUsr("B", "1");<br>
String pwstring = getInfo.getPortlUser.getPortUsr("B", "2");<br>
String CNNstring = getInfo.getPortlUser.getPortUsr("B", "3");<br>
String PROXY_user_name = "test$" + userid;<br>
//String PROXY_user_name = "test1$roger" ;<br>
String url= "jdbc:oracle:oci:@" + CNNstring;<br>
Properties prop = new Properties();<br>
try {<br>
if ( userid.trim().toUpperCase().equals(getInfo.getCONN.chkPortal.trim().toUpperCase()) )<br>
{<br>
ALLretStr = "<tr><td>Default user: " + userid + "</td></tr>"; }<br>
else<br>
{<br>
// Create an OracleOCIConnectionPool instance with default configuration
OracleOCIConnectionPool cpool = new OracleOCIConnectionPool(userstring, pwstring , url, null);<br>
Properties proxUserProp = new Properties();<br>
proxUserProp.setProperty(OracleOCIConnectionPool.PROXY_USER_NAME, PROXY_user_name);<br>
OracleConnection conn__OCI = cpool.getProxyConnection
(OracleOCIConnectionPool.PROXYTYPE_USER_NAME, proxUserProp);<br>
cstmt = conn__OCI.prepareCall ("begin PORT_CURSOR.s_submission_wip( ?,?,?,?,? ); end;");<br>
cstmt.setString(2, cnumb);<br>
cstmt.setString(3, cperiod);<br>
cstmt.setInt(4, retStrC);<br>
cstmt.setString(5, retStr3);<br>
cstmt.registerOutParameter (4, Types.NUMERIC);<br>
cstmt.registerOutParameter (5, Types.VARCHAR);<br>
cstmt.registerOutParameter(1, OracleTypes.CURSOR);<br>
cstmt.execute();<br>
retStrC = cstmt.getInt (4);<br>
retStr3 = cstmt.getString (5);<br>
retStr = "<tr class=OraDataText><td> " + retStrC + "</td></tr>";<br>
retStr = retStr + "<tr class=OraDataText><td> " + retStr3 + "</td></tr>";<br>
if ( retStrC == -1 ) { ALLretStr = ALLretStr + retStr; }<br>
else<br>
{<br>
cursor = ((OracleCallableStatement)cstmt).getCursor(1);<br>
while (cursor.next ())<br>
{<br>
if (spacerLine >= 2)<br>
{<br>
ALLretStr = ALLretStr + "<tr><td ALIGN=LEFT nowrap ></td><td colspan=5 height=1 ></td></tr>";<br>
}<br>
ALLretStr = ALLretStr + "<tr WIDTH=100% class=smmjPort2Text >
<td ALIGN=LEFT nowrap ></td><td ALIGN=LEFT> " + cursor.getString(1) + "</td><td ALIGN=CENTER>" + cursor.getInt(2) + "</td><td ALIGN=CENTER>" + cursor.getString(3) + "</td><td ALIGN=CENTER>" + cursor.getString(4) + "</td><td ALIGN=RIGHT>" + cursor.getString(5) + "</td></tr>";<br>spacerLine++;<br>
}<br>
}<br>
if (cState != null )<br>
{ //return(retStr);<br>
if (conn__OCI != null) conn__OCI.close();<br>
if (cpool != null) cpool.close();<br>
}}<br>
return(TempretStr);<br>
}<br>
catch (SQLException e )<br>
{<br>
String retErrStr = retStr + " SQL Error: <PRE> " + e + " </PRE> \n";<br>
return(retErrStr);<br>
}<br>
}<br>
%><br>
Regards,<br>
Vijay. -
How to get the data from Pooled Table T157E.
Hi Experts,
How to get the data from Pooled Table T157E.
Any help.
Thanks in Advance,
Ur's Harsha.create some internal table similar to T157E and pass all data as per SPRAS.
After that use internal table in your program as per the requirement.
Regds,
Anil -
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
How to get the date of first day of a week for a given date
Hi gurus
can any one say me how to get the date of first day(date of Sunday) of a week for a given date in a BW transformations. For example for 02/23/2012 in source i need to get 02/19/2012(Sunday`s date) date in the result. I can get that start date of a week using BWSO_DATE_GET_FIRST_WEEKDAY function module. But this function module retrieves me the start date as weeks monday(02/20/2012) date. But i need sundays(02/19/2012) date as the start date. So it would be really great if anyone sends me the solution.
Thanks
RavHi,
The simplest way would be to subtract 1 from the date date which you are already getting in transformation routine, but instead of doing that subtraction manually which might need bit of errort, you can simply use another FM to subtract 1 from given date.
RP_CALC_DATE_IN_INTERVAL
Regards,
Durgesh. -
How to get the Date in a particular format?
Hi,
How to get the Date in the below format? I will be passing the year in my method..
2/10/2003 9:46:52 PM
D/M/YYYY H:M:S A
public Date getDate (String year) {
Here i want to get the Date in this format
2/10/<Passed Year> 9:46:52 PM
ThanksThis is my code
public static Date getCalendar(Calendar calendar,int getYear) {
String formatted_date="";
int year = getYear;
int month = calendar.get(Calendar.MONTH+1);
int day = calendar.get(Calendar.DATE);
int hour = calendar.get(Calendar.HOUR);
int min = calendar.get(Calendar.MINUTE);
int sec = calendar.get(Calendar.SECOND);
int am_pm =calendar.get(Calendar.AM_PM);
formatted_date = month+"/"+day+"/"+year+" "+hour+":"+min+":"+sec+" PM";
System.out.println("formatted_date is "+formatted_date);
o/p : formatted_date is 1/4/2006 1:44:21 PM
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
// DateFormat dateFormat =DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
Date passdate = new Date();
try {
passdate = dateFormat.parse(formatted_date);
} catch (ParseException e) {
System.out.println("Invalid Date Parser Exception "+e.getLocalizedMessage()+"DateFormat is "+dateFormat);
System.out.println("The Date inside the function is "+passdate+"and the year passed is "+year);
o/p : The Date inside the function is Sat Apr 01 00:00:00 IST 2006and the year passed is 2006
return passdate;
Expected O/P is 3/1/2006 1:44:12 PM
}
Maybe you are looking for
-
Itunes will not open on win 7 pc after oct update?
I am running a win7 pc-64bit os and itunes will not open since I updated it in Oct. I have attempted uninstalling and reinstalling the itunes s/w several times. I have tried without a firewall and with anti-virus programs disconnected. I do not get a
-
I can't insert any dvd's because my dvd drive won't open when I push the open key. It has always worked in the past. Any suggestions on how to fix this?
-
CcmSetup failed with error code 0x80004005 - windows 8.1
using sccm 2012 r2, trying to push to a windows 8.1 client i get: <![LOG[==========[ ccmsetup started in process 7416 ]==========]LOG]!><time="16:05:28.041+00" date="01-15-2014" component="ccmsetup" context="" type="1" thread="9272" file="ccmsetup.cp
-
Sync Notes: Can they be viewed in ICloud from IPhone 4S?
Any help would be much appreciated! I like to use NOTES on my Iphone4S but I can't seem to get them anywhere else but on my phone. I assume they're backing up but is there a way in ITunes or ICloud to view them?? Thanks in advance! -HowEweDoin Birm
-
Instalation Pre-production 8.0.5
I can't install Oracle by typing ./orainst but I'm able to do it with ./install script. I have not any problem when creating the database but: Where is Scott user ? Where are the help tables for SQL*PLUS ? Which is the difference between one instalat