How to get next months date
Hi. How do i return date records of next month?
I am aware i may need sysdate.
At the moment i have been trying:
WHERE delivery_date = ADDMONTHS (sysdate, 1);
No avail.
Ideas?
Hello
If you mean you want to set up a range from the start of next month to the end of next month. This shows what happens when you apply add_months to sysdate
SQL> select sysdate from dual;
20-NOV-05
SQL> select add_months(sysdate,1) from dual;
20-DEC-05
--Truncate sysdate to the first day of the month and then add 1 month
SQL> select add_months(trunc(sysdate,'MM'),1) from dual;
01-DEC-05
--do the same, but use LAST_DAY to get the date of the last day next month
SQL> select add_months(trunc(sysdate,'MM'),1),last_day(add_months(trunc(sysdate,'MM'),1)) from dual;
01-DEC-05 31-DEC-05So with that in mind, you probably need to do something like
WHERE
delivery_date BETWEEN add_months(trunc(sysdate,'MM'),1) AND last_day(add_months(trunc(sysdate,'MM'),1));If you just want to get rows for "this" day next month you may well need to set a date range up especially if the delivery_date has not been truncated to set the time portion to 00:00:00
WHERE
delivery_date = ADD_MONTHS(TRUNC(sysdate),1))
WHERE
delivery_date >= ADD_MONTHS(TRUNC(sysdate),1))
AND
delivery_date < ADD_MONTHS(TRUNC(sysdate),1)) + 1HTH
David
Message was edited by:
david_tyler
Similar Messages
-
How to get next day date (i.e., tommarow's date) from java
Hi all,
One small help plz..........
Which is the method to get next day date(for eg: 2mmarow)....
How can I get tommarow's date from Date class or some others in Java..
Iam able to get today date.....but my requirement is I should get next day date....Plz help me....
Plz help me.....
Any help will be appreciated...
Thanks a lot.....~!~!Here's a working example:
import java.util.Calendar;
import java.text.SimpleDateFormat;
public class Tomorrow {
public static void main(String[] args) {
Calendar c = Calendar.getInstance(); // current date
c.add(Calendar.DAY_OF_MONTH, 1); // add one day
SimpleDateFormat sdf = new SimpleDateFormat("dd"); // use the pattern: day_of_month
String str = sdf.format(c.getTime()); // fromat the date to string
System.out.println(str); // print it at the console
}You should read the [url http://java.sun.com/j2se/1.5.0/docs/api/java/util/Calendar.html]Calendar and [url http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html]SimpleDateFormat class javadoc. -
How to get previous month data from current month values
Hi Experts,
I have made one universe from BW Query in which Fiscal year period is entered in interval.
I have made a universe from that and want to develop webI reports on top of that.
In my webI reports, i have used one cross tab. In Rows section i have added Company Code and in Column section i have used Fiscal Year/Period and in Value section i have added Sales Value. I want this value of previous month.
Requirement:
Ex.
Feb'09 Mar'09 and so on...
Comp_code1 Sales of Jan'09 Sales of Feb'0f and so on....
I am getting this.
Ex.
Feb'09 Mar'09 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
I hope i have clear my requirements.
Please help as soon as possible.
Thanks in Advance,
RishitHi Rishit,
Follow the below steps to get the desired result.
Step1: Convert your fiscal year period from char to a date in your database or in your designer however its feasible.
to_date('substr('009.2009',2)','mm.yyyy')
you will get the result 01 sep 2009
Step2: Convert this format to 01/09/2009 by using date functions.
Step3: Create a Detail associated to the 'date' field (typically your fiscal period).
Step4: Create a cross tab Like : Rows section should have Company Code and in Column section should have 'date'(created detail) and in Value section should be Sales Value.
you should get the following result.
01/02/2009 01/03/2009 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
Step5: Use the following formula in your Column (date) formula bar.
=(<date>-1)-DayNumberOfMonth(<date>-1)+1
You will get the following result:
01/01/2009 01/02/2009 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
Format the cell according to your reruirement.
Let me know if you will get any break in the above steps.
Regards,
Swati. -
How to get whole month date based on date
hi
i have data at cube with calday and calyear/month
when ever i entre date like 17/03/2009 , i want output not from 17th , i need output whole month of march?
please let me knowHi,
Here is the solution:
1. Create 'ZM_END' Customer exit variable on 0Calday.
Properties: Mandatory
Intervel
Uncheck ready for Input
0calenderday
2. Create ZCDAY User entry Variable on 0Calday
Properties: Mandatory
Single
Check ready for Input
0calenderday
3. In columns create new selection and then drag & drop your Keyfigure and also Drag 0CALDAY and then restrict 0CALDAY with Variable - ZM_END
If user will enter 17/03/2009, then the result is from 01/03/2009 to 31/03/2009. I think this is what you are expecting.
DATA: ZT_SDT TYPE SY-DATUM,
SDT TYPE SY-DATUM,
ZT_DT1 TYPE SY-DATUM,
ZT_DY(2) TYPE N,
ZT_MT(2) TYPE N,
ZT_YR(4) TYPE N,
WHEN 'ZM_END'.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZCDAY'.
IF sy-subrc = 0.
CLEAR: l_s_range.
ZT_SDT = loc_var_range-low.
ZT_DY = '01'.
ZT_MT = ZT_SDT+4(2).
ZT_YR = ZT_SDT+0(4).
CONCATENATE ZT_YR ZT_MT ZT_DY INTO ZT_DT1.
CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
EXPORTING
DAY_IN = ZT_SDT
IMPORTING
LAST_DAY_OF_MONTH = SDT
EXCEPTIONS
DAY_IN_NOT_VALID = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
l_s_range-low = ZT_DT1.
l_s_range-high = SDT.
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 Mar 18, 2009 3:33 AM -
How to get year,month,date from a Date object?
thanks
The getTime() method will return the number of milliseconds since January 1, 1970, 00:00:00 GMT. You can then write a number of functions to calculate the date from this.
The toString() function returns a string with the current value of the object - i.e 2002-10-17 (it's unusual formatting (YYYY-MM-DD) is useful when validating an input in real time, though beyond this, I've no idea why they put it this way around). You can then use string function substirng() to break this down into parts.
i.e. if your Date object was called today:
String DD = today.toString().substring()(8)
String MM = today.toString().substring()(5,2)
String YYYY = today.toString().substring()(0,4)
There are other methods (see API) - but these have been deprecated - that means, although they can be used, they are not recomended.
There is also a Calendar object, though this seems to have the same problems.
Hope this helps :) -
How to get current row data in table control
Hi , expert ,
I am professional in oracle , but now I am a new guy in SAP ABAP .
I have a question in UI
How to get current row data and click pushbutton in table control to open next screen ?
I want to get the current data and open next screen to carry out detail detail .
Thansk for all your suggestion .GET CURSOR LINE SY-CUROW .
READ TABLE internal_table index SY-CUROW. -
How to get the "current date" in the BEx?
Hi all,
I need to get the "current date" in my Bex report in order to make a comparison. I know there is a "How to" which shows how to get the current date via a User Exit, but I didn't find it. Could you please help me?
Thanks1. Create a New Formula in Key Figures structure
2. Give tech name and description and Select "New variable" option
3. Next screen will launch Variable Wizard -> create a new variable with replacement path as processing type
4. in next screene select the date characteristic that represents the first date to use in the calculation (From Date)
5. In the next screen select Key in the Replace Variable with field. Leave all the other options as they are
6. In the next Currencies and Units screen select Date as the Dimension ID.
6. Save variable
repeate the Above steps to create another variable (To Date)
and now you can use these two new replacement path variables in your new formula.
Dev -
How to get the current date ? in the form of dd/mm/yyyy?
Hi all,
As getDate( ), getMonth( ), and getYear( ) is depricated, how to get the current date or System date, month and year ? please help ??
Regards
AshviniHI,
Than u for the reply. But i am getting one error.
as u said, I tried to do so.........
but, i am getting one error.
code
Calendar cald=(Calendar.getInstance.getTime());
out.println(cald);
error message
validate$jsp.java:86: Attempt to reference method getInstance in class java.util.Calendar as an instance variable.
Calendar cald=(Calendar.getInstance.getTime());
^
1 error
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
Pls help
Regards,
Ashvini -
How to get current month and last month dynamically??
how to get current month and last month dynamically
like
month = getCurrentMonth();
lastmonth = getcurrentMonth() -1;
please help
thankshi :-)
/* depracated but can be still useful */
java.util.Date dtCurrent = new java.util.Date();
int month = dtCurrent.getMonth();
int lastmonth = dtCurrent.getMonth() - 1;
System.out.println("* " + month);
System.out.println("* " + lastmonth);
/* better to use this one */
Calendar cal = new GregorianCalendar();
int imonth = cal.get(Calendar.MONTH);
int ilastmonth = cal.get(Calendar.MONTH) - 1;
System.out.println("*** " + imonth);
System.out.println("*** " + ilastmonth);
regards, -
How to get Default (System) Date Format Pattern?
How to get system default date format which is defined in Regional Setting of Control Panel.
We can get an instance of DateFromat using DateFormat.getDateInstance(DateFormat.SHORT) but problem is that there is no toPattern() exist in class DateFormat.
However toPattern() exist in class SimpleDateFormat but there is no costructor like SimpleDateFormat(DateFormat)
So please advise me, how can I get system short date format pattern?
Thanks
GAJESH TRIPATHII reterieve the system date format but not which is currently defined in regional setting of control panel but it returns the format which is installed by default when windows(os) is installed.
Edited by: gajesh on ? ????????, ???? ??:?? ?????????
Thanks to provide me solution. My source code related problem is solved but still I am not getting format which is defined in control panel. but By Letting that it is not possible in Java,... I am doing my next work...so CLOSE THIS TOPIC Thanks'n Bye. -
Need formula in my subreport to get last month date - CR XIr2
Post Author: olesco
CA Forum: Formula
I need to pass the value (#of units) from the subreport to the main report u2013 I know how to do that but my problem is I donu2019t know what formula should I put in my subreport to get last month date.
Both main report and subreport have a date parameter (Field link - {?DatePrompt}. What I need is when I fill in the current month date to the main report the subreport should process the last moth date.
Main report u2013 Date Range (2007-10-1) (2007-10-31) - result #of units = 22
u201CRecord Selection Formula Editor
DateRecd = {@DatePrompt} [i.e. current month]
Subreport u2013 should have data from last month - result #of units = 25
u201CRecord Selection Formula Editor
DateRecd < {@DatePrompt} [last month] ??????
There are 22 3 units this month and 25 units last month.
Any help is greatly appreciated.Post Author: SKodidine
CA Forum: Formula
DateRecd in dateadd('m',-1,minimum({@DatePrompt})) to dateadd('m',-1,maximum({@DatePrompt})) -
How to get the creation date of an event/meeting
I need to implement some control rules on booking conference rooms depending on the creation date and start date.
For example:
- the booking cannot be accepted if the meeting start date is less than 2 hours ahead
at 3:00 PM I can book the conference room for a meeting starting at 5:05PM
but not for a meeting starting at 4:55PM
- the booking cannot be accepted after 5:30PM for a meeting starting the next morning before 10:00AM
at 5:45PM I can book the conference room for a meeting tomorrow at 11:00AM, but not for a meeting at 9:45AMHi Michel,
how to get the creation date of an event/meeting?When you use the calendar sdk to fetch a meeting there is an Icalendar(http://www.ietf.org/rfc/rfc2445.txt) property called CREATED with the creation time in UTC.
For example:
- the booking cannot be accepted if the meeting start
date is less than 2 hours ahead
at 3:00 PM I can book the conference room for a
meeting starting at 5:05PM
but not for a meeting starting at 4:55PM
You would want to implement these rules with with the sdk? That would implie that users connecting to the calendar server with any other client than the calendar sdk could still book these resources whenever they want.
Or you would want to go an validate all the meetings once they are already created?
Cheers,
Jean-Philippe -
How to get the actual data in ALV report
I am doing some upgradation work in that i am using Submit & And return and also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
With the use of set table for 1st display i got the ALV report but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get the actual data in ALV report, With the use of Any Function Module or with Coding,
with regards,Hi Saravana
I am sure you must be getting the values in tables of table parameters from every FM.
consolidate the values from tables of all FMs in one table and built ALV for that table only.
I hope this way you can show the actual data in ALV.
thanks
Lalit -
How to get last Build date of a dll in the real time target
Info On My Project
I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...
I am facing some problems while checking Build date of my Application file( .dll)
I have tried to use GetFileDate API. But it is not supporting for realtime Target..
So i have tried __DATE__ macro.. That also having some problems..
How to get last Build date of a dll from the real time target ??
Please Help to solve this....
Thanks
Vaishakh A KPlease reply if any one have suggestion...
-
I loos my APPLE ID, Now I have a new one, how can get access to data stored in the old one?
Do you have the email & password of the old Apple ID?
Maybe you are looking for
-
Please help me fix error " Application descriptor file cannot be parsed "
I start with Flash - AIR for Android When i publish : A notice : "Error creating files Application descriptor file cannot be parsed" File XML by Flash created : <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <application xmlns="http://ns.ado
-
Dear All, I just check in DB02 that there is one secondary Index is missing on Production server. Database object for VBAK is inconsistent: (Secondary indexes) Indexes: Inconsistent with DDIC source ABAP Dictionary Database Index does not exist I
-
How can I get iPhoto 11 to include titles when uploading to Flickr
I am using iPhoto 11 and when I upload to Flickr, it will not include titles. I have tried using the share feature and the drag and drop feature and titles are not transferred to Flickr. Is there some way to get my titles in iPhoto to be included w
-
Oracle Application Testing Suite Service does not start
Hi, I have installed Oracle Application Testing suite to test web services.I have also installed Jboss 4.0.2 AS. Now wen i m starting the Oracle Application Testing suite Service it gets stopped automatically.I could not open the Load Testing Page.An
-
Multiple ALEAUDIT Acknowledgments
Dear All, We have SOAP->XI->IDOC scenario, in this we are posting goods Movement to R/3. We have confgiured ALEAUDIT at R/3 side. Acknowledgemnts are coming back in to XI. But I am confused about why am I getting multiple acknowledgments for on messa