A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
Joined: Apr 09, 2012
Mar 19, 2013 05:30:34
I am working on providing data from yesterday date to jan 1'st of last year sequentially.
eg : from 3/19/2013 to 1/1/2012
from 3/19/2013 to 1/1/2011 so on for 10 years.
From the below code i am getting the date exactly 1 year back date,like 3/19/2012. how can i get the subtration to be dne in such a way that i could get dates from jan 1'st onwards?
Calendar cal = Calendar.getInstance();
cal.add(cal.YEAR, -1) ;
please help on this.
Joined: Jan 19, 2012
Mar 19, 2013 13:55:21
Calendar c1= Calendar.getInstance();
Please let me know if this meets your requirement
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Calendar dates
Java Date and time classes - Format AM_PM field
Get Sum of column and the retrive the data month wise.
How to get weeks for a particular year with Calendar object
how to Calculate fiscal month if start year and end date is given using JAVA
select boxes depends on other select box
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015