Current date to back years finacial dates
Hi,
I am looking a salution for current year motnh to back years financial month.
If current month is April 2009 I want to go bakc finacial year 2008 which is always be june(Financial Month).
sysdate - saydate finincalil month and year
It is always go back to JUN the year can be any year. For example I want to go back to JUN 2003 and current year 2009 and April is the month so from April to JUN 2003.
But mostly for 2008
Similar Messages
-
MTD(Month To Date) and YTD(Year To Date) with one example
can any ont Explain about MTD(Month To Date) and YTD(Year To Date) with one example plz
Hi,
Can you please elaborate.
MTD is from the 1st of the current month till today's date.
YTD is from 1st Jan till today's date.
If you trying to build this is query. Create restricted key figure and put restriction on calday with a customer exit for the same.
Thanks,
S -
Converting Date.toString() back to a Date object for compare
I know this is beating a dead horse to death but I have wasted a whole day trying to get this to work. Here is the problem.
I need to convert a Date().toString (format returned: Dec 19, 2006 3:39:58 PM EST) back to a Date object. What I am doing is writting this string a text file and then revisiting it to compare later to a current Date object to find the difference in the two stamps in milliseconds.
J2SE 1.4.2 being used
Date date = new Date();
String newDateStr = log[1].trim(); // entry from log file
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date logDate = dateFormat.parse(newDateStr);
// get difference between the two
long timeSpan = date.getTime() - logDate.getTime();
if(timeSpan > 60000){
// TO DO
}So should I look at a different approach at either:
A) Storing the date/time stamp in the text file
B) The conversion back to Date object is wrong
Really appreciate any insight on this.
Thanks
JLW
Message was edited by:
jlwestsrThen my friend you are in the same status as Tim.:o)
I don't know as much as him and I don't care to write
an elaborate reply most of the time. :D
Merry ChristmasSame to you.I don't pretend to know that much, but When I see something I do know, I tend to give examples.
Most probably that is because at the present time I am in a situation where most of my time is spent waiting for a call from the customer, and the app I am supporting works so well that those calls are few and far between. Lucky for me, they pay me for sitting around and answering questions on a forum.
At least it is a java forum, where I can justly claim that I am improving my knowledge of java.
~Tim -
To filter data acording to year of date field of a table
Hi i have a table
TABLE T1(ID NUMBER, SET_DATE DATE)I want to select id values from this table by comparing year present in set_date field.
For that i wrote
select id from t1 where set_date like '%2010%' ;It's returning no rows.
But the following code is working
select id from t1 where set_date like '%10%' ;Though second code is working there is a demerit in both these code because i am not specifying to match year.It's quite possible that 10 may be present any where else, and this query will return all those rows.So how to filter rows according to year?You should be careful that applying a function to your date column will bypass any indexes - unless it is an appropriate function based index. It is often better to convert your criteria to a match your data rather than convert your data once for every row in the table. The following example will allow the optimizer to use an index if appropriate;
with t1 as(
select 1 id, sysdate set_date from dual union all
select 2, add_months(sysdate,-12) from dual)
select id
from t1
where set_date between to_date('01-jan-2010', 'dd-mon-yyyy') and
to_date('31-dec-2010 23:59:59', 'dd-mon-yyyy hh24:mi:ss');
ID
1 -
To find last year's data / a particular year's data
Hi ,
How to find out the data for the entire last year , i tried like
entered_date between to_char( '12/31/2008 11:59:59', 'MM/DD/YYYY HH12:MI:SS')
and to_char('01/01/2010 00:00:00', 'MM/DD/YYYY HH12:MI:SS' ) , but it is an invalid number error.
thanks.Hi,
If you want something that doesn't require hard-coding a year, but automatically figures out what year it is:
WHERE entered_date >= ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
, -24
AND entered_date < ADD_MONTHS ( TRUNC (SYSDATE, 'YEAR')
, -12
)There are a couple of things to notice about the expression you posted (besides using TO_CHAR instead of TO_DATE):
WHERE entered_date BETWEEN TO_DATE ('12/31/2008 11:59:59', 'MM/DD/YYYY HH12:MI:SS')
AND TO_DATE ('01/01/2010 00:00:00', 'MM/DD/YYYY HH12:MI:SS')BETWEEN includes both endpoints, so the expression above covers a tiny bit more than one year. It includes one second from 2008 and one second from 2010, as well as all of 2009.
Currently 2010 is the last year, so the expression you posted (as well as my suggestion) is actually for the year before last year, but it can easily be changed for any year. -
Monthtodate showing year to date totals
I have document all designed with crosstab, all i want it month to date totals and year to date totals. i have use existing formulas and the yeartodate one works, however, the monthtodate is displaying year to date totals on the report.
Can someone please help? I am farily new to Crystal.Thank you for responding Ian.
I am confused now, how will I get the Call types across the top if i don't use a cross tab?
Hardware Software Merchandise HR
1 MTD MTD MTD MTD
YTD YTD YTD YTD
2 MTD MTD MTD MTD
YTD YTD YTD YTD
3 MTD MTD MTD MTD
YTD YTD YTD YTD
4 MTD MTD MTD MTD
YTD YTD YTD YTD
This is what i have, but the MTD total is the same as the YTD total.
Or am i way off base?
Nita Kay -
Due to sourcing issues, it would be easier to load year to date and calculate month. All documentation shows month rolling up to year to date. Will year to date work?
You can create your time dimension so that you load your YTD data into a 'YTD' member. You can then use a shared hierarchy to calculate your discrete months.E.g - Jan = "Jan YTD"Feb = "Feb YTD" - "Jan YTD"Mar = "Mar YTD" - "Feb YTD"etc.If Time is dense then these can easily be set to dynamic calcHope this helpsDave Cooper, Analitica Ltdwww.analitica.co.uk
-
Post PO & GR on the date of one year back
I want to post PO & GR on the date of one year back, is it possible?
hi
You can only post in OPEN PERIOD i.e. current open period and previous open period
If you try to post in privious year it will give you error saying posing possible only in period 09/2008 and 08/2008
Regards -
How to fetch year till date value for earning for current ,last and year
hi,
how to fetch year till date value for earning for current ,last and year before that from payroll result
plz reply soon,
pratyushDear Pratyush,
Pick this from CRT.
Use LDB PNPCE & Fire event GET PAYROLL &
then you can pick from CRT.
Hope this helps.
Kindly reward in case useful.
Regards & Thanks,
Darshan Mulmule -
Return current period based off of current fiscal year and date
Good Afternoon,
Is there a way in the webi that I can create a dimension that always reflects the current Fiscal Month based of Fiscal year and date? I have a report that I am trying to show sales for a customer based off the current fiscal month. I would like this report when refreshed to be based off this fiscal month dimension instead of showing each fiscal month or changing it manually. What is the best way to do this?
I have attached an image that shows current numbers by period (month) and then the YTD Totals. I would like to have my 'Period' column always reflect the current period and the Total column to reflect that months totals based off the period column. So for this period (3), instead of seeing 3 lines for each month I would just see the '3' and the total as $541,310.46, monthly as 412,502.09 and my YTD as 1,080,091.06.
Any help is always appreciated!
Thank you,
TiffanyHi,
Create a variable
FlagVar=If([Period]=Max([Period]) In Report;"Show";"Hide")
And apply block filter of FlagVar=Show
Are these coming TotalSales MonthlyGoal YTDSales directly from universe? If they are calculated at report level then you might want to use NoFilter. like =NoFilter([YTDSales]) -
CURRENT YEAR SALES DATE PARAMATER AND PRIOR YEAR SAME DATE RANGE
I am pulling data from a SQL view dbo.view that has current and historical SOP data by line. The date paramater is a date range, uppr date and lower date formulas are in the report. I need to include prior year SOP data for the same prior year date range in the detail. I have tried adding the view in twice with no luck, just duplications. Ultimately I want to supress the detail and only show the totals by customer so it is comparitive. Thanks for your help. Jayne
OK
lets simplify it
get a test data source with some simple dates in it.
get the report logic working.
it looks like you have the right formula ideas but lets go for
@upperthisyear
@upperlastyear
@lowerthisyear
@lowerlastyear
then assuming a date field of {table1.date}
the record selection would be
if (@upperthisyeare > {table1.date} and @lowerthisyear < {table1.date}) or (@upperlastyeare > {table1.date} and @lowerlastyear < {table1.date}) then 1 else 0
I would test this by using it as a formula field with the test data. -
Current month and previous months of fiscal year period data
Hi All,
My requirement is end user will enter month ie (fiscal year period ) and in report my requiremnt is to show data in two columns 1.Current month data and
2.April till date.
Please let me know how to do this and please send the coding to be done in CMOS.
RegardsHi,
In your query, you should have following object :
in filters:
fiscal period object, with an user entry variable on it (UE_MONTH)
in rows/ratios:
Current month column, with your KF and a restriction on 0calmonth2 with an customer exit variable on it (ie: CE_VAR1)
same for April column. (CE_VAR2)
in your customer exit, CMOD, step 2, add these two cases :
WHEN 'CE_VAR1'.
READ TABLE i_t_var_range WITH KEY vnam = 'UE_MONTH' INTO
intern_range.
CONCATENATE intern_range-low(6) sy-datum+4(2) INTO l_s_range-low.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
Same for April, add a new case and just replace sy-datum+4(2) by '04'.
Hope it helps, -
OBIEE 11g - Current year date and the same date in Previous year
Hi Experts,
I have an attribute say RECEIPT NO, i want to display the "No of Receipts" i.e(count(receipt no)) for any given date in the current year as well as for the same date in previous year.
Please suggest me how to achieve this in 11g.
ThanksHi Veeravalli,
Thanks for your prompt help.
Could you please ellobarate this. I have to display the count(receipt_no) for the last year same date.
Thanks -
Date function to pull back dates of the year?
is there a built in function for returning all dates (whatever format) between to dates ?
Example:
Select functionname('2009/06/01', 'yyyy/mm/dd), ('2009/06/05', 'yyyy/mm/dd')
from dual
Wanted results
2009/06/02
2009/06/03
2009/06/04Hi,
user11210446 wrote:
Here is what I'm trying to do,
There is a start date and an end date. I have US holidays for current year in a table so for example christmas 12/25/2009
I want to show dates between the start date and end date, and if there is a holiday on that date it will not show.
make sense
so if a user puts 12/23/2009 for start and 12/29/2009
it would show
12/24/2009
12/26/2009
12/27/2009
12/28/2009Yes, that's very clear.
I would actually do that with a NOT IN sub-query
SELECT TO_DATE ('&start_date', 'MM/DD/YYYY') + LEVEL - 1
FROM dual
WHERE TO_DATE ('&start_date', 'MM/DD/YYYY') + LEVEL - 1 NOT IN
SELECT appropriate_column
FROM holiday
CONNECT BY LEVEL <= 1 + (TO_DATE ('&end_date', 'MM/DD/YYYY') - TO_DATE ('&start_date', 'MM/DD/YYYY'));where &start_date and &end_date are substitution variables in MM/DD/YYYY format. You could use bind variables just as well.
This assumes the DATEs in holdiay are all midnight. If not, use TRUNC (appropriate_column).
Edited by: Frank Kulash on Jun 4, 2009 12:59 PM
There's nothing like clicking that "Save" button to give you better ideas!
MINUS is a little simpler than NOT IN:
SELECT TO_DATE ('&start_date', 'MM/DD/YYYY') + LEVEL - 1
FROM dual
CONNECT BY LEVEL <= 1 + (TO_DATE ('&end_date', 'MM/DD/YYYY') - TO_DATE ('&start_date', 'MM/DD/YYYY'));
MINUS
SELECT appropriate_column -- or TRUNC (appropriate_column)
FROM holiday
ORDER BY 1; -
Current period/Year to Date Amount calculation
Hi,
I would like to create a query in Bex Query Designer.
Requirements:
If I enter current period and Fiscal year then the report should appear total of period 1 to current period.
Example:
Period: 4
Year: 2008
For Cost Elements in Controlling.
The report should be like
|Cost Elements | Amount of(P1P2P3+P4)|
I can keep select variable as filter to enter current period, But how can I calculate the total amount from period 1 to current period.
Any help would be appreciated.
Thanks,
Aparna.
Edited by: Aparna Pyeddu on Jan 29, 2009 9:45 PM
Edited by: Aparna Pyeddu on Jan 29, 2009 9:46 PMHi,
To get the required output do like this...
1. Create a Customet Exit Variable on 0FISCPER. (Single, Mandotory, Uncheck Ready for InPut):'ZFY_CURR'
2. Create a Customet Exit Variable on 0FISCPER. (Single, Mandotory, Uncheck Ready for InPut):'ZFY_CUR1'
3.In Free Chars drag and Drop 0FISCPER and the restrict with Variable '0P_FPER'.
4.Create New Selection in Columns and the Drag your Key figure and then Drag 0FISCPER and then restrict with (Select Value Range) []ZFY_CURR; ZFY_CUR1.
5. Execute the report then you can get the desired output.
The below Code is for From Period
WHEN 'ZFY_CURR'.
Data: ZSF(4) type C,
ZSF1(3) type C,
ZSFY(7) type C,
ZSFH(7) type C.
ZSF1 = '001'.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = '0P_FPER'.
IF sy-subrc = 0.
CLEAR: l_s_range.
ZSF = loc_var_range-LOW+0(4).
ZSFH = loc_var_range-LOW.
CONCATENATE ZSF ZSF1 INTO ZSFY.
l_s_range-low = ZSFY.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
ENDLOOP.
The below Code is for To Period
WHEN 'ZFY_CUR1'.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = '0P_FPER'.
IF sy-subrc = 0.
CLEAR: l_s_range.
ZSFH = loc_var_range-LOW.
l_s_range-low = ZSFH.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
ENDLOOP.
Thanks
Reddy
Edited by: Surendra Reddy on Jan 31, 2009 2:46 PM
Maybe you are looking for
-
Map ID not appearing in "Edit Map IDs" dialog box
I have RH HTML 8. I am adding new topics and assigning map IDs to those topics via the Edit Map IDs dialog box. All of my map IDs appear in the BSSCdefault.h file as well as the project's .hm file. I even manually added the topic string to the projec
-
Hi, I am making report on Pur.Requisition report and i want to display that these are d Purchase Requisition which are which are <b>released</b> by these person at dis date,if anybody provide me useful help he or she will be definately rewarded....
-
Open Hub 3rd Party - Process Chain Automation
Hi, I have a requirement to fulfill the Open Hub extraction to 3rd party SQL Server DB using process chain automation. There are at times no deltas and during the execution of DTP since there are no delta's the request status shows GREEN but overall
-
I'm having problems with a checkbox always being checked. no matter if I have unchecked it or not when my form is returned to my action class the checkbox is always on. I have seen several threads mentioning this, but none seemed to give me the answe
-
I need help activating new sim card
i need help activating my sim card