harpd dhillon

Greenhorn
+ Follow
since Jun 03, 2003
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 harpd dhillon

Hello,
I'm trying to display a field ( type timestamp) in the form on the browser. This is wut i tried to do:

and then:
out.println("<TR><TD width=150 align = right >");
out.println(" initialized: ");
out.println("/TD");
out.println("<TD align = left >");
out.println("<INPUT type=text name=initialized value="(new SimpleDateFormat("EEE' 'YYYY/mm/dd' 'HH:mm:ss")).format((java.util.Date) +member.initialized + , new StringBuffer(),new FieldPosition(DateFormat.YEAR_FIELD)).toString();">");

Ofcourse, its not working..any suggestions or help would be greatly appreciated. thanks a lot
20 years ago
Hello Simon,
I'm totally new to this. COuld you plz gimme an example??...I'd appreciate it greatly
20 years ago
I'm trying to get the values from the form and update the corrosponding database record.
I know for String variable , i would use:
member.password = req.getParameter("password");
I need to know how to get variable of type int and timestamp object.
Any suggestions would be greatly appreciated. Thanks a lot
20 years ago
it works!!!. Thanks Kim and Christian for your help. Appreciate it
20 years ago
I'm creating a report for one table. And if the field is null, it should show blank in the report. I have endtime field of type timestamp and if its null, its gotta show blank in the report. The problem is its showing null in the report instead of blank. ANy hlep would be greatly appreciated. Thanks. Here's the code
java.sql.Timestamp endtime = rs.getTimestamp("endtime");
if(rs.wasNull())
{
endtime =null;
}
and the below code generates HTML session for this row
out.println(" <TD width=150 nowrap>");
if(endtime == null)
out.println(" " + endtime);
else
out.println(" " + (new SimpleDateFormat("EEE' 'MM/dd/yyyy' 'HH:mm:ss")).format((java.util.Date) endtime, new StringBuffer(), new FieldPosition(DateFormat.YEAR_FIELD)).toString());
20 years ago
i meant thanks a lot for you help.
have a good one
20 years ago
thanks a lot for your David.
It workedddddddddddddddd!!!
20 years ago
Hello,
i'm developing a servlet that shows the fields of table in mysql , and if the field is null, it shows blank. I don't know how to compare timestamp object to null. For example:
java.sql.Timestamp endtime = rs.getTimestamp("endtime");
Now, i wanna check if the database value is null and if it is i wanna leave it blank.
thanks for your help
20 years ago