Last date of month

Advertisement
Hi im new to java. Looking for a class that provides last date of the month according to a given year and month .
Advertisement

Replay

java does provide a calendar object for gregorian
dates.. surprising its called GregorianCalendar. :PAs I said avoid GregorianDate in Java it is a poor implementation. Date arithmetic is overly complex. There are inconsistencies i.e. Month starts at zero Jan is 0 day of week starts at 1 (Sunday = 1, Monday = 2) First of the month is 0 not 1 as one would expect. Sun's date does not handle dates prior to 1970 ( a real pain in your are doing historical data analysis). Suns Date uses 2 digit years.
BigDate makes date arithmetic a slam dunk.
To find the second monday in June 1961
BigDate aDate = new BigDate(BigDate.nthXXXDay( 2, 1, 1961, 6));
yyyy = aDate.getYYYY();
mm = aDate.getMM ();
dd = aDate.getDD ();
To calculate 156 days after the 1st of Jan 1999. You would do the following.
BigDate aDate = new BigDate (1999, 1 , 1 + 156, BigDate.NORMALIZE);
yyyy = aDate.getYYYY();
mm = aDate.getMM ();
dd = aDate.getDD ();
or
BigDate aDate = new BigDate (1999, 1 , 1 );
aDate.setOrdinal(aDate.getOrdinal( )+ 156);
yyyy = aDate.getYYYY();
mm = aDate.getMM ();
dd = aDate.getDD ();

Customer Exit for Number of Days from 1 st Apr to last date of Month Enter

Hello BI Experts, I have a requirement to count the number of days from 1 st April of current year to the last date of month entered. For example : The use will enter say July 2010 or 003.2010  (as Fiscal Year Variant is V3 ). Today is 14 July ...So

RE: FM to get last date of month

Hi, Please tell me if there is a function to return the last day of the month. The input is year+month eg 200710 should return a date 31.10.2007 I noticed that most of the function needs a date, ie DDMMYYYYHi, use RP_LAST_DAY_OF_MONTHS SELECT-OPTIONS

How do we find first date of a month and last date of month?

is it required long caluculation or is there any simple method?hi, try this FM -> 'HR_JP_MONTH_BEGIN_END_DATE' chk this also CALL FUNCTION 'LAST_DAY_OF_MONTHS' EXPORTING DAY_IN = sy-datum IMPORTING LAST_DAY_OF_MONTH = v_lastdate. <--Gives you the la

Get Last date of every Month in a year

Hi All, I need to find last date of month for given year. Example: I used to pass date or year such as 2012 or 01-01-2012(DD-MM-YYYY) SQL query needs to return last date of every month such as 31-01-2012 28-02-2012 31-03-2012 30-04-2012 31-12-2012 fo

First and Last date of any Month.

Hi Friends, I have 2 fields in my table FROM DATE & TO DATE User can enter any date in these two fields, but at time of commit i want to change the FROM DATE to the first date of the Month user have entered. And for TO DATE i want to change the last

Show records corresponding to last date of last 3 months

Experts, I have a list of records in my logical table like this. All I need to do is create an analysis that will show the records corresponding to last date of the last 3 months. Assuming current month is July. The report must show only the highligh

Previous month last date in sql

hi i am using function select dateadd(day,1 - DATEPART(day,dateadd(month,24-36,GETDATE())),dateadd(month, 24- 36, getdate())) this will giveme 2014-03-01, now what changes  i need to make this function which will give me previous month last date. 201

Variable last date of previous month/last date of current month

Hello Experts, I am facing an issue while designing a query. Requirement is like this. Report will be run on monthly basis.so on execution of report, it should prompt for month/year. now on report there are two columns for which I have to get data on

Last Date on which stock Qty was zero

Dear Gurus, LIS structure S032 can tell us the date of last GR,Cons., Iss. & movement date. is there any field which tell us the last date on which stock qty was zero ? Regards, FRDear Bijay Pradhan, Thank you so much for your response, actualy we ar

What is the formula to bring the current last date from period hierarchy

Hi, Iam working on Hyperion financial Reporting.i have created a grid with 2 dimensions(entity and period).My requirement is that the current last date of the period hierarchy should be displayed automatically in the header when the report is run.wha

Display data in month wise

Hi all, I have my data in the table as date wise. I need to sum this data in month wise. Can anyone tell me how to do it. Is their any fm to do it or any sample pgm of this kind. For ex my output should be like this : field1 field2 Month1 Month2 Mont

How to calculate first date of month from a given date in IDT BusinessObjects

Hello Experts, I have a date field in IDT Universe which shows date in this format: Dec 13,2014 12.00.00 PM. Now I want to extract first day and last day of month from this date value. For example: here I want to see Dec 01,2014 12:00:00 PM and Dec 3

How to get last date of the week

hi, how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week.. thnxdata : p_week type KWEEK, p_Date type SYDATUM. p_week = <incoming value in week of year> CA

Last Data packet for the data load.

Hi All, How to find the last data packet loaded to target for the data load in SAP BI? In the Table? Thank you, AdhviHi Adhvirao, When u r loading the data from ECC go to monitor ---> details ---> check the data pacaket which are failed double click

When I pre ordered my iphone 6 i was told I was going to get an additional 1 gig of data per month for a year.  It even shows it on the receipt i received with the phone.  When will I see that reflected on my account.  I have had my new phone for a week a

When I pre ordered my iphone 6 i was told I was going to get an additional 1 gig of data per month for a year.  It even shows it on the receipt i received with the phone.  When will I see that reflected on my account.  I have had my new phone for a w

HOW DO I SEE THE LAST DATE I BACKED UP ON ICLOUD

How can I see the last date that icloud was backed up?Go to Settings>iCloud>Storage & Backup and look at the very bottom under Back Up Now.Read other 2 answers

Min,Max for a time Range and Sum of Records for the last date/time

Hi All, I have a table with the following structure/data: create table  Events   (                                     [EventID]        int                   NOT NULL,                                     [Title]             nvarchar(200)  NOT NULL,  

Last Date for customer transaction

Is there a SAP field which stores the last date for a customer transaction. Thanks.yes there is a field which stores the last date for a customer transaction Regards PS: Be clear in your question.Read other 2 answers

Date into month

Hi All, I calculated  opening stock,closing stock based on the date,now I need to calculate based on month also, Is any functionmodule is there to convert date into month. [email protected], Sree.hi list of FM try A CALCULATE_DATE : Calculates the future