total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME

total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME

 <%-- 
    Document   : insertdate
    Created on : Jul 19, 2013, 3:48:28 PM
    Author     : CG0T4908
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body bgcolor="#4eeerwty">
     <%
    String Empname=request.getParameter("empname");
    String Empid=request.getParameter("empid");
    String projectname=request.getParameter("projectname");

      String Requirementid=request.getParameter("RequirementID");


     String taskid=request.getParameter("taskid");

    String category=request.getParameter("category");
    String Datet=request.getParameter("Date");


      String Starttime=request.getParameter("starttime");
        String Min=request.getParameter("minutes");
       String ampms=request.getParameter("ampms");
     String Endtime=request.getParameter("Endtime");
     String Endmin=request.getParameter("endtimeminutes");
      String Endampm=request.getParameter("endtimeampm");
      String TaskDescription =request.getParameter("comments");
           String tottime =request.getParameter("Endtime");

//System.out.println("Reqqq"+Starttime);//
    Connection con;
    Statement st;
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    try
     {
        //int Dated =Integer.parseInt("Date");
        // char Dater=Character.parseChar("Date");

        con=DriverManager.getConnection("jdbc:microsoft:sqlserver://10.32.4.27:1433;DatabaseName=chinna;User=sa;Password=sa");
        st=con.createStatement();
        int f=st.executeUpdate("insert into inserttable(projectname,RequirementID,taskid,category,datet,Starttime,Endtime,TaskDescription,TotalTime,EmployeeID)values('"+projectname+"','"+Requirementid+"','"+taskid+"','"+category+"','"+Datet+"','"+Starttime+"/"+Min+"/"+ampms+"','"+Endtime+"/"+Endmin+"/"+Endampm+"','"+TaskDescription+"','"+tottime+"','"+Empid+"')");
        if(f==1)
            {
        out.println("Data  Saved");
        }
        else
            {
              out.println("Failed");
         }
        }
    catch(Exception e)
            {
        out.println("error"+e.getMessage());
        }

   %>
</body>
</html>
View Answers









Related Tutorials/Questions & Answers:
total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME
total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME   <%-- Document : insertdate... =request.getParameter("Endtime"); //System.out.println("Reqqq"+Starttime);// Connection con
plz help me any one as fast as u can
plz help me any one as fast as u can  A thief Muthhooswamy planned... is given in an array. Write a program to find out the total number of jumps he... return total number of jumps to the output variable output1 provided Examples
Advertisements
can any one give the frogort password code using jsp,
can any one give the frogort password code using jsp,  plz give the code for frogot password
have any one tried ajaxanywhere with jsp/servlet please provide sample
have any one tried ajaxanywhere with jsp/servlet please provide sample  hello you can find this app here: http://ajaxanywhere.sourceforge.net it explains how to use this with struts but not with simple jsp servlet(or i am
Calculator - JSP-Servlet
Calculator  Dear Deepak Sir, Calculator program is avilable in Jsp/Servlet plz send me. Thanks & Regards, VijayaBabu.M  Hi vijay calculator program in jsp function checkValue(){ var msg
edit database using jsp and servlet
edit database using jsp and servlet  I am creating a website using jsp and servlets that is used to view houses from a database. I want to be able... information from the database in the textboxes. Please help me to display
update database using two queries at a time
update database using two queries at a time  String sql="insert into employee values(emp_seq.nextval,\'"+ename+"\',\'"+eadd+"\',\'"+ephone... to perform insertion in both the tables i.e employee and appusers at the same time
How to delete the row from the Database by using servlet
: Delete row from database using servlet   In that link solution...How to delete the row from the Database by using servlet  Dear Sir/Madam I am trying to delete the one user data in the Oracle SQL server database
Retrieve image from database using servlet and display in JSP
Retrieve image from database using servlet and display in JSP  Hi, I am total new to JSP although I am learning it for the last few days. Now I want to use MySQL Database from JSP page. How to retrieve image from database using
How to retrive database information using servlet and disply in table format in browser
How to retrive database information using servlet and disply in table format in browser  Hi, any one send code how to retrive the data base information in table format in web browser
how to display a table from database using servlet
how to display a table from database using servlet  how to display... the following link:ADS_TO_REPLACE_1 http://roseindia.net/jsp/servlet-jsp-data... the following link: http://roseindia.net/jsp/servlet-jsp-data-list.shtml ThanksADS
retrive the employee details with image from mysql database using jsp servlet
stored in the database using jsp servlet then want to show the result in the next jsp page. any one help me out...retrive the employee details with image from mysql database using jsp
Insert Image into Database Using Servlet
Insert  Image into Database Using Servlet   ... image into database table using Servlet. This type of program is useful in social... the image from database using Servlet. After retrieving the image from database
Insert  Image into Database Using Servlet
Insert  Image into Database Using Servlet   ... of inserting image into database table using Servlet. This type of program is useful... to retrieve the image from database using Servlet. After retrieving the image from
how to connect the database using hibernet through servlet/jsp through form
how to connect the database using hibernet through servlet/jsp through form  plz give me the reply   Hi Friend, Please visit the following link:ADS_TO_REPLACE_1 http://www.roseindia.net/jsf/myfacesspring
Upload Excel into Database Table Using SERVLET - JSP-Servlet
Upload Excel into Database Table Using SERVLET  Hi i hava sitution that upload .xls file into database table which has same coloumn names... in database table are NAME,ID,SAL. please help me to upload that excel using
how to write the coding for converting the database data for example population into any type of graph using jsp and servlets?//
the database data for example population into any type of graph using jsp and servlet...coding for converting the database data  how to write the coding for converting the database data for example population into any type of graph using
HTML code to servlet to database using jdbc
HTML code to servlet to database using jdbc  pls send me the code related to the title   Hi Friend, Try the following code:ADS_TO_REPLACE_1 1)form.html: <html> <form method="post" action="http://localhost
calculate total hours by start time and end time in javascript - Ajax
well. i want to display total hours by using start and end timepicker. pls clarify my doubts. how to calculate total hours by using start and end time field...calculate total hours by start time and end time in javascript  hi, i
Upadate Database using updatable fields - JSP-Servlet
Upadate Database using updatable fields  Hi, Thanks for previous... is pulled from database and displayed in the updatable fields.Means after user submits, the database table should get updated with these new entries he has made
Image upload in mysql database using jsp servlet
Image upload in mysql database using jsp servlet  Hello, I need code to insert image in mysql database, I have seen the code which is already in your portal but it is not inserting image into database it save in the folder
fetch record from oracle database using jsp-servlet?
fetch record from oracle database using jsp-servlet?  how can i fetch data from oracle database by using jsp-servlet. i'm using eclipse, tomcat server and oracle database and creating jsp pages and also using servlet
How to display image in jsp from database using Servlet?
How to display image in jsp from database using Servlet?  Hi, How to display image in jsp from database using Servlet? Thanks   Hi, You will find code and example program at Retrieve image from database using Servlet
How to browse excel file and stored the contents into the database using jsp/servlet?
How to browse excel file and stored the contents into the database using jsp/servlet?  Hi.. I want to browse excel file and stored the file data into the My-sql database using jsp/servlet
How to retrieve image from database using jsp and servlet?
How to retrieve image from database using jsp and servlet?  Hi, I am trying to find code for displaying the image from database in a JSP page. How to retrieve image from database using jsp and servlet
How to get the data from the database using Servlet or JSP program
How to get the data from the database using Servlet or JSP program  ... the problem   Get data from database using servlet Retrieve data from... by using servlet or jsp program by typing the output as like this below
How to insert image in sql database from user using servlet
How to insert image in sql database from user using servlet  pls tell me accept image from user and insert image in sql server 2005 database using servlet and jsp
Populate dropdown menu from database using jsp and servlet
Populate dropdown menu from database using jsp and servlet  please i need code to populate dropdown menu from mysql database using jsp and servlet. thanks
can any one explain this
can any one explain this  class Clidder { private final void flipper() { System.out.println("Clidder"); } } public class Ex3 extends Clidder { public final void flipper() { System.out.println
Java example to calculate the execution time
will describe you the way that how one can calculate or get the execution time... program we are using System.currentTimeMillis() method for getting current time... we have stored the current time in a variable startTime and after the method
Retrieve database from the table dynamically in jsp from oracle using servlet
using java servlet from the database in the jsp page...Retrieve database from the table dynamically in jsp from oracle using servlet  Sir, I have created a table in oracle using eclipse, and added few
Create a web application using any technology to display 10 most relevant tweets from Twitter in real-time for the keyword
Create a web application using any technology to display 10 most relevant tweets from Twitter in real-time for the keyword   Create a web application using any technology to display 10 most relevant tweets from Twitter in real
web application using any technology to display 10 most relevant tweets from Twitter in real-time
web application using any technology to display 10 most relevant tweets from Twitter in real-time  web application using any technology to display 10 most relevant tweets from Twitter in real-time
How to store multiple images in folder and images path in database at a time using jsp?
How to store multiple images in folder and images path in database at a time using jsp?  I wanna browse multiple images in one form and store them in one folder and their path into datrabase
unable to display image using html tag in servlet.(image src is in a variable.....). i am using netbeans IDE. plz..........do help
unable to display image using html tag in servlet.(image src is in a variable.....). i am using netbeans IDE. plz..........do help  import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException
How to delete the row from the Database by using while loop in servlet
server database by using Servlet program (Tomcat server). In Database table...How to delete the row from the Database by using while loop in servlet .... It is Urgent...  When you retrieve the data from the Database by using
fetch and insert multiple rows into mysql database using jsp servlet
fetch and insert multiple rows into mysql database using jsp servlet  hello!!! I am building a attendance sheet in which, I am getting data from one... a problem to insert multiple rows into database using a single insert query
Plz Plz reply Me - JSP-Servlet
Plz Plz reply Me  Respected Sir/madam, I am R.Ragavendran.. Actually I got your coding.. But This code is not enabling the user to click and change... using radio buttons.. You have used the following syntax for checking whether
Error in connecting to the mySQL database in TOMCAT using more than one PC (database connection pooling)
Error in connecting to the mySQL database in TOMCAT using more than one PC (database connection pooling)  how do i implement connection pooling...(); I was able to successfully connect using one PC. But when I use another PC
What is Hibernate one to one relation?Any example..
What is Hibernate one to one relation?Any example..  Hello, What is Hibernate one to one relation? Is there any example of it.. Thanks..   Dear Friend, Here are detailed tutorials and examples of Hibernate One-to-one
How to Open Picture From M.S. Access Database using Java Servlet ?
How to Open Picture From M.S. Access Database using Java Servlet ?  ... Database But i m still not able to open this picture through Java using M.S. Access and i wants to open this Picture On Web Browser using Java Servlet anybody can
save multiple records into database using jsp/servlet mvc
save multiple records into database using jsp/servlet mvc  hai... it to database in single hit user.jsp <form action="UserServlet" method="post...; </table> </form> after add user click pass values to servlet
plz help me!!!!!!!! - JSP-Servlet
plz help me!!!!!!!!  i`ve set the environment varaibles for tomcat as well as jdk.. but i`m not understanding where i`ve to save my servlet..i.e.... there are compilation errors.. plz do help me.   make sure that you did
Problem insert data into database using servlet n javabean - Java Beginners
Problem insert data into database using servlet n javabean  I created a servlet for registration proses I got a problem compiling my servlet... to solve it.. i really new in jsp+servlet+javabean,dont really unnderstand 1)my
Graphical calculator using AWT - Java Beginners
Graphical calculator using AWT  hi Sir, I need a source code for the following prgm...pls help me.. Implement a simple graphical calculator using AWT.The calculator shd perform simple operation like addition, subtraction
Upload Image and save in database using jsp-servlet mvc
Upload Image and save in database using jsp-servlet mvc  Here is my code.. In jsp ... <form name=frm method="post" action="Device">...;/tr> In servlet... try { String strpath
Upload Image and save in database using jsp-servlet mvc
Upload Image and save in database using jsp-servlet mvc  Here is my code.. In jsp ... <form name=frm method="post" action="Device">...; In servlet... try { String strpath=request.getParameter("Image
Graphical calculator using AWT - Java Beginners
Graphical calculator using AWT  Hi Sir, Thanks for the reply... But i got some errors while compiling some of them i made clear but still one error.....and is it the same code we need implement on Graphical Calc using Swing? Here is the prg code
How to store values in a database using JSTL? - JSP-Servlet
How to store values in a database using JSTL?  I want to store values in a database... How can i store in database? Here is my code... This wil... in database using JSTL name number Position add
prog. using radio buttons for simple calculator
prog. using radio buttons for simple calculator  import java.awt....*; class Calculator extends JFrame { private final Font BIGGER_FONT = new Font... = new CalculatorOp(); public Calculator() { textfield = new JTextField("0

Ads