Win a copy of Terraform in Action this week in the Cloud forum!

niranjan angadi

Greenhorn
+ Follow
since Jan 09, 2006
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 niranjan angadi

Hi All,

I am getting Date column (DueDate) from database through hibernate. It will be of format "6/23/2005 12:02:30 PM". I need to format it to "yyyy-MM-dd" before displaying/setting it to DO object (as a date only).

I used SimpleDateFormat class to format date. But sdf.format(dueDate) returns string, i need date object back so as to set it to DO object. So i used sdf.parse(sdf.format(dueDate)) which returns date object, but now returned date will be not in my required format("yyyy-MM-dd"), it will be in "Tue Jun 12 00:00:00 IST 2007".

Could you help me out how to format the date in required format and get back as date object.

Or else, simply I have Date Time object and i want to truncate time part. Want to display only date (yyyy-MM-dd, 2007-06-12).
14 years ago
thanks its working now
[ January 09, 2006: Message edited by: niranjan angadi ]
I am getting error while compiling ejb related files

I am getting following error. I dont know which jar file to be included in class path. I have both BEA-Weblogic and j2ee server.

I dont know how to set class path for deploying ejb component.

E:\niranjan\day12>javac HelloBean.java
HelloBean.java:1: package javax.ejb does not exist
import javax.ejb.*;
^
HelloBean.java:5: cannot resolve symbol
symbol : class SessionBean
location: class HelloBean
public class HelloBean implements SessionBean
^
HelloBean.java:7: cannot resolve symbol
symbol : class SessionContext
location: class HelloBean
SessionContext ctx;
^
HelloBean.java:35: cannot resolve symbol
symbol : class SessionContext
location: class HelloBean
public void setSessionContext(SessionContext ct)
^
4 errors