Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


chinnadurai
total time calculator (starttime+endtime) in servlet USING DATABASE IN SQL2000 PLZ ANY ONE HELPME
0 Answer(s)      a year and 3 months ago
Posted in : JSP-Servlet


 <%-- 
    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>

Advertisement
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
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
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
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
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
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
Calculator
Calculator  need a simple java program to degin a CALCULATOR without using ADVANCED JAVA....   Calculator in Java Swing
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
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
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
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
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
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
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
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
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
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
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
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
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
could any one help me?
could any one help me?  I'm a student in the faculty of computer and information science we will make graduation project "taxi dispatcher" we need to use mobile "x6 nokia" in car and send the coordinate of car through gps which
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
how to display a table from database using servlet
how to display a table from database using servlet  how to display... the following link: http://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks...://roseindia.net/jsp/servlet-jsp-data-list.shtml Thanks
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
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
Calculator
Calculator  Dear Friends, I need code (or advice) for to calculate the value based on my policy name,policy value and policy duration for my mini project in jsp-servlet. Help Me to solve. Advance thanks you dear friend
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: http://www.roseindia.net/jsf/myfacesspring/loginRegistration.shtml Hope
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: 1)form.html: <html> <form method="post" action="http://localhost:8080/examples/Data
Advertisements
 

 

 

DMCA.com