Madhavi Gupta

Greenhorn
+ Follow
since Jan 30, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Madhavi Gupta

Hi Guys,
Thank you very much for your replies.
The problem was with mm.
Madhu
22 years ago
Hi,
I have a string for date pattern called dPattern which is of the form ""mm/dd/yyyy"(dPattern = ""mm/dd/yyyy").I use this pattern to make the SimpleDateFormat class as
SimpleDateFormat sd = new SimpleDateFormat(dPattern);
I take a String of the form ,say ex: ateStr = "09/12/2001";
Date dt = sd.parse(dateStr, new ParsePosition(0));
The date dt when turned as a String gives me a strange Date as Jan 2001.
Also, if I use it in the Gregorian Calendar to set the time and access the month, the month comes out as January.
Can you pl explain me the reason and also, tell me how to do it right??
Here is the total code::
dPattern = ""mm/dd/yyyy"
SimpleDateFormat sd = new SimpleDateFormat(dPattern);
Date dt = sd.parse(dateStr, new ParsePosition(0));
System.out.println(dt.toString());
Calendar calendar = new GregorianCalendar();
calendar.setTime(dt);
int month = calendar.get(Calendar.MONTH) + 1;

Thanks in advance,
Madhu
22 years ago
Hi,
I have a string for date pattern called dPattern which is of the form ""mm/dd/yyyy"(dPattern = ""mm/dd/yyyy").I use this pattern to make the SimpleDateFormat class as
SimpleDateFormat sd = new SimpleDateFormat(dPattern);
I take a String of the form ,say ex: ateStr = "09/12/2001";
Date dt = sd.parse(dateStr, new ParsePosition(0));
The date dt when turned as a String gives me a strange Date as Jan 2001.
Also, if I use it in the Gregorian Calendar to set the time and access the month, the month comes out as January.
Can you pl explain me the reason and also, tell me how to do it right??
Here is the total code::
dPattern = ""mm/dd/yyyy"
SimpleDateFormat sd = new SimpleDateFormat(dPattern);
Date dt = sd.parse(dateStr, new ParsePosition(0));
System.out.println(dt.toString());

Calendar calendar = new GregorianCalendar();
calendar.setTime(dt);
int month = calendar.get(Calendar.MONTH) + 1;

Thanks in advance,
Madhu
22 years ago
Hi,
I want to use Persistence sessions in Websphere.I am trying to use a database to store the session info.Do I need a DBA userid/password for the database that can do creates/drop indexes etc, to use this persistence sessions in Websphere??
Or would a normal id that does reads on db tables will be enough to do with persistent sessions??
Thanks in advance,
Madhu
22 years ago
Hi all,
I'm using Apache SOAP and VISUAL AGE FOR JAVA test environment(WTE). I have deployed a service and I'm trying to access it thru a java client.
I have an error which says NoClassDefFoundException at SOAPMappingRegistry class. But I have imported the whole package, import org.apache.soap.encoding.*;
I'm not sure why i have this exception.
Can anybody help me with this?
Thanks,
Madhu
22 years ago