Getting correct Date/Time data in DIAdem 11 from LabView tdms data

I've got a handful of large tdms  files (9-18 million data points) collected with LabView that I need to extract elements of, and export as a text file, with the time data as a string.
I'm using DataFileLoadSelect and the Register option and then DataBlCopy to bring in a chunk of data at a time, but I'm having to explicitly convert each time value from a LabView timebase (1/1/1904) to the DIAdem timebase (1/1/0000), not to mention the offset,  before writing the date-time as a text string - this really slows the process down. 
I't strikes me that DIAdem(11.1) has got to have a way to read LabView timestamps correctly, but I'm a DIAdem novice, so any suggestions would be helpful. And no, I don't have LabView installed locally, so using a LabView vi is not an option for me.
Thanks,
Eric
Solved!
Go to Solution.

WfmToDateWfm works great, but there is a bug in the code if you want to use DataFileLoadRed and your starting point is not at the beginning of the file.  There is a provision in WfmToDateWfm to handle the offset, but it's not hooked up:
OffStartTime = ChnPropValGet(Channel, "wf_start_offset") ChnDeltaTime = ChnPropValGet(Channel, "wf_increment")
RelStartTime = 24*3600*(Trunc(ChnStartTime) + 693958 + Abs(Frac(ChnStartTime)))
To make WfmToDateWfm work with an offset, simly add the variable OffStartTime to the RHS of RelStartTime
Eric 

Similar Messages

  • Can't get access in Time Machine to certain folders for any date earlier than current date/time.

    Can't get access in Time Machine to certain folders for any date earlier than current date/time, even when entering as Admin. Why do certain folders have small red "-" badge in lower right corner of folder icon?  Here's a picture of the dilemma:
    I've tried monkeying with priveleges using Command I, and changing users, but to no avail.  Can anyone help?

    Right.  Here's what the permissions look like from the Finder Command I:
    I'm not sure what "Custom" means, but when I then try to change it to "Read & Write", it doesn't take.... just comes back as Custom. Interesting to note that not only am I logged into Joan's account where the data folder and file lives) to do this, but when I do it from my own account  as Admin (dunc...mpster) I get the same result.

  • How to get the first day in the month from a domain date ?

    Hi,
    I like to know how to get the first day in the month from a domain date?
    Thanks
    Stephen

    Hi Gokul...
    Instead of using the funtion module you can just write the 3 statements of code to get the first day of the week.
    Its similar to the above one but instead of writing case statement you can achive the following.
    data : w_res type i,
             w_data type d,
    w_res = w_date mod 7.
    w_date = w_date - w_res.
    write w_date.
    This works.
    Regards,
    Siddarth

  • Appointment - End Date/Time to be default sames as Start Date/Time

    When a sales rep chooses a “start date/time” to schedule an appointment in CRM, can the “end date/time” be updated as same as “start date/time”?
    E.g. Select Start Time: 4/5/2010 10:00AM, then the End Time: 4/5/2010 11:00AM should default to the selected Start Time.
    Thanks for your help.
    Edited by: MaheshCRM on Mar 23, 2010 4:06 PM

    Hi Narendra
    Function mdoule STU3_ALERTS_CONV_UTC_2_LOCAL may help you in order to solve your issue. you may use it in user-exit.
    regards
    M.

  • Importing ansi date time format into diadem

    Hi,
    I have an ANSI data log txt file with the time channel format  30/03/2006 15:51:08.846 and i am trying import into DIADEM  using the date/time format dd/mm/yyyy hh:nn:ss.fff , but when the file is imported, the time channel cells appear as NO VALUE. Can anybody help please ?
    AdeK

    Hi Adek,
    Here is a DataPlugin which loads your data file into DIAdem 10.2.  There are a number of advantages to using a DataPlugin over the ASCII Import Wizard, so long as your data files follow a similar data file structure.  To register the DataPlugin, just detach the ZIP file, unzip the URI file within, then double-click on the URI file in Windows Explorer.  After that, you will be able to load your TXT data files by dragging&dropping them directly from the NAVIGATOR tree view or Search Results into the Data Portal on the right hand side of DIAdem.  DataPlugins also support selective loading, register loading, reduced loading, and DataFinder indexing, so all of these immediately become available to you with your TXT files.  Note also that header lines 2-4 are now declared as both File and Group properties.
    Ask if you have questions using the DataPlugin,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    Adek_TXT.zip ‏2 KB

  • Day of year bug - format date/time string and scan from string?

    I've noticed that the day of year returned by "Format Date/Time String.vi" starts with a value of 1 for Jan-1 while "Scan from String.vi" wants a 0 index.  Is this a bug or feature?  
    (I'm using Labview 2010 Service Pack 1)

    I think the best idea is to use seconds since for your arithmetic, because it is going to be the most consistent and robust solution. Knowing that a day has 86400 seconds is all that is needed and you won't run in possible inconsistencies with date time implementations caused by our anything but logic calender. I would hazard that the functionality of converting a timestamp into year and day of year and back is impossible to make consistent without sacrificing other possibly conflicting transformation in the Timestamp into String and Timestamp from String manipulations.
    "Seconds since" being the actual base unit in all LabVIEW timestamps, it is best to do any arithmetic on it in this base unit.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Date time stamp to be converted into only date

    Hi Experts,
    when i am using substirng functoin for converting datetimestamp to date it is giving the following error
    i am using RNIF pip to be converted into IDOC ORDERS 05
    the time stamp value from pip should modified in that so that i can get only the date
    by elemiting the time asscioated with it so i used substring functoin it is giving following error
      /ORDERS05/IDOC/E1EDK02/DATUM. The message is: Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 8] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@107c499] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ORDERS05/IDOC/E1EDK02/DATUM. The message is: Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 8] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@107c499] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:347) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:398) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:141) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 8] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@107c499] at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:56) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:291) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:398) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:141) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Root Cause: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.getValue(FunctionWrapper.java:47) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:291) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:309) at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:398) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:141) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:102) at com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169) at com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0.execute(MapServiceRemoteObjectImpl0.java:301) at com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0p4_Skel.dispatch(MapServiceRemoteObjectImpl0p4_Skel.java:146) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320) at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198) at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 8 at java.lang.String.substring(String.java:1441) at com.sap.aii.mappingtool.flib3.TextFunctions.substring(TextFunctions.java:33) ... 26 more RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ORDERS05/IDOC/E1EDK02/DATUM. The message is: Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 8] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@107c499]
    thanks
    sunil

    Hi,
    Do as follows.
    Use standard date transformation function.In that format of source date give as hh:mm:ss ddMMyyyy and format of targeet date as you wish..It wil solve.
    Please award marks if found useful.
    Thanks
    Hamja

  • Displaying date/time in the report of last updating data?

    Hi,
    I have produced a report over a multiprovider. The multiprovider is built up from tow cubes. The data is being updated to one cube each hour and to the another cube one time daily.
    The date/time that display in the report is for the last updating data of the cube that updating one time daily.
    I want that the date\time be updated each hour, in another words, to display the date\time of last updating data to the second cube.
    Any suggestions?

    Hi Mohamad,
    Please read through this discussion for a solution:
    ROLLUPTIME of a multiprovider
    Hope this helps...

  • Populate data into standard component alv from Zcomponent popup data selected

    HI All
    I have to call Zcomponent in standard component and need to pass value into Zcomponent (table) and from  Zcomponent select row and pass back to standard component.
    Steps
    1) Created Zcomponent with interface node
    2) Enhanced the standard component and create used components for  Zcomponent and make it available at component controllers and view controllers.
    When I click on Button in standard component I am calling this Zcomponent as popup window.
    My problem I when I select data in Zcomponent I need to populate the data in ALV of standard component.
    I thought of 2 methods to take my selected back and populate data into standard component ALV.
    1) Create event: EVENT1 and   Interface method Method1 and link to EVENT1
    So that I can raise this event in Zcomponent and populate the data into standard component ALV
    Problem: Under events interface checkbox is visible, when I select my enhancement implementation the interface checkbox not visible under events tab?.
    2) Create Interface method Method1 write logic to populate data into standard component ALV
    But here to when I select my enhancement implementation the interface checkbox not visible under?
    Can anyone please help me why interface checkbox is not visible or any better solution to populate the data back to standard component alv?
    Thanks
    Gopal

    Hi Gopal,
    You can achieve your requirement by using EVENTS as below
    Create an event SET_DATA in component controller of zcomponent and mark it as interface and also include the parameters like context_element( type ref to if_wd_context_element), etc as below
    Now, create an action for the event onLeadSelect of your zcomp Table and write the below code
                     DATA lo_ctx_element TYPE REF TO if_wd_context_element.
                   "get the selected row
                     lo_ctx_element = wdevent->get_context_element( name =
                        'NEW_ROW_ELEMENT' ).
                   "Raise the event with parameter
                   wd_comp_controller->fire_set_data_evt( context_element = lo_ctx_element ).
    Use the Zcomponent in your standard component and make available in std. view's properties
    Create an event handler SET_DATA method for your Zcomp's event as below
    Now, inside this method, you get the parameter CONTEXT_ELEMENT and get the data from this context element as below
                   context_element->get_attrribute( ) or
                   context_element->get_static_attributes( )
    You can populate the data into standard component based on the obtained value from Zcomponent.
    Hope this helps you.
    Regards,
    Rama

  • Due date falls on 80 days from base line date ........but end of that month

    Hi All
    Can any one please guide me in creating a payment term
    The Base Line Date would be 80 days from Posting date ........... But end of that month
    Example
    Posting date 01.01.2009 so the base line date would be on 21st March
    01.01 ;          31.01 ;                            31 Days
    01.02 ;          28.02 ;                            28 Days
    01.03 ;          21.03 ;                            21 Days               80 Days              
    But due date should fall on end of that month 31st of march
    So irrespective of any day calculated as above in that month  it will always take the baseline date as last day of the month    
    Its Picking up the posting day as Baseline date from Transaction VA01 -> Additional data tab -> ETD ( Festinated Time of Departure)
    From this date it need to calculate the due date as above ( 80 day but last day of the month)
    Please Guide
    Many thanks in advance
    Aadi

    Hi Aditya,
    You may have to create 2 payment terms using the day limit option to meet this requirement.
    Follows the below steps -
    T-code OBB8
    Term 1
    Payment terms = xxxx (as you wish)
    Day limit = any number between 10-15 (you may fix an appropriate date as you think fit for your business)
    Default for baseline date = Posting date
    Payment terms/fixed date = 31
    Payment terms/additional months = 2
    Term 2
    Payment terms = same name as above
    Day limit = 31
    Default for baseline date = Posting date
    Payment terms/fixed date = 31
    Payment terms/additional months = 3
    Logic here is... for all invoices with posting date on or before 10th-15th of a month, 80th day will fall definitely on the 2nd month. Invoices with posting date after 15th, the 80th day will fall on the 3rd month.
    You have to take a concious decision on the day limit number. Because 80 days will not exactly work for all the months.
    Regards,
    Mike

  • Discussion - Date/Time POJO property - String or java.util.Date

    Hi,
    I always wonder how date/time should be declared in POJOs - String or java.util.Date. I have used both and always felt comfortable with String but still would like to know your views. (In DB datatype is datetime).
    I know some of you will say "as per requirement" but what I have experienced we never give too much thought and when we have issues down the line we start wondering.

    I always wonder how date/time should be declared in POJOs - String or java.util.Date. I have used both and always felt comfortable with String but still would like to know your views.
    (In DB datatype is datetime).If the latter is a given, then I would definitely use a Date. Doing the Date/String conversion at the DAO level seems an improper location; in particular, it constrains what upper layers can do with it:
    - if the business logic has to do date/time computation, it will have to convert back to Date (or Joda DateTime)
    - if the UI needs a different representation than the one that was used in the DAO (such as, different time zone, or showing only the month, whatever,...) it will probably need such a conversion too, and another one for the reformatting (or clumsy code parsing the date string).
    I know some of you will say "as per requirement" but what I have experienced we never give too much thought and when we have issues down the line we start wondering.I can easily see the issues caused by premature conversion to String. But what kind of issues do you risk if you keep the Date representation?
    In summary, I'm all in favor of using a Date (or Joda DateTime ) all along, until it's eventually displayed.
    Regards,
    J.

  • Master data time dependant attribute in query for several dates

    Hello all,
    I need to create a query to display prices for a material in different periods. 
    The user will enter a period interval.  For each period, they want to know the material price the last day of that period.
    Material price is a time-dependat attribute of material, and I created one formula variable to display it. The problem is the using the key-date of the query only works for a date, but not for severals.
    Is there any other way to do it?
    If not, the only solution I find is to have in the infoprovider the prices that I need, but I don't think this is a good practice.
    Any suggestions?
    Thanks!

    I have just seen something: in fact the created lines are:
    Key1   Compound1   fromdate    todate    attr1      attr2
    0001      L      01.01.1000      01.01.2006          <empty
    so as you can see, the right interval is created but the attributes are not up to date.
    Cheers.
    Cyril.

  • How to load a curve and the view automatically in diadem from labview ?

    Hello,
    I want to automate a system for processing and analyzing data and for that I am using labview.
    I recently discovered software diadem and already I am able to send data from labview.
     I would now like to obtain a curve directly in the "view" is that possible?

    Hello Beneuss,
    You can create a layout template in VIEW, save it to disk and then load it when DIAdem is started. These two lines will automatically load a VIEW layout called "Example" and display the VIEW window.
    Call View.LoadLayout("Example.tdv")
    Call WndShow("VIEW")
    To automatically have a curve show up in VIEW, make sure that you assign the correct curves in the VIEW layout before you save the layout. This is done with the drag&drop functionality from the DataPortal. Just assign the channel you wish to see, and then save the layout. It will "remember" all the channel assignments and automatically show all the channels you had assigned, as long as you don't change the channel names.
    Please let me know if that helps and if there is anything else we can help you with.
         Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • How to get Correct curent time and date

    Hi,
    I would like to know whether system keeps updating SY-UZEIT each second or it contains the time value when the program was started.
    Suppose a program starts at 12:00:00 time and takes 10 sec to finish. Will I get same value of SY-UZEIT or will i get 12:00:10 as value of sy-uzeit just before completetion of program?
    If the time is not updated each second, how can I get the correct time?

    Hi surya,
    the SY-UZEIT will not be automaticly updated in the runtime.
    you have to use GET TIME.
    Here a short example to show the different:
    REPORT ZGRO_TEST.
    TABLES: MARA.
    write: / 'without get time'.
    WRITE: / SY-UZEIT.
    SELECT * FROM MARA up to 10000 rows.
    ENDSELECT.
    WRITE: / SY-UZEIT.
    write: / 'with get time'.
    get time.
    WRITE: / SY-UZEIT.
    SELECT * FROM MARA up to 10000 rows.
    ENDSELECT.
    get time.
    WRITE: / SY-UZEIT.
    regards, Dieter

  • Insert date time into oracle database from jsp

    pls tell me ,from jsp how can I insert datetime values into oracle database .I am using oracle 9i .here is codethat i have tried
    html--code
    <select name="date">
    <option selected>dd</option>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    </select>
    <select name="month">
    <option selected>dd</option>
    <option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
    </select>
    <select name="year">
    <option selected>dd</option>
    <option>2004</option>
    <option>2005</option>
    <option>2006</option>
    <option>2007</option>
    </select>
    here the jsp code
    <% date= request.getParameter("date"); %>
    <% month= request.getParameter("month"); %>
    <% year= request.getParameter("year"); %>
    try
    { Class.forName("oracle.jdbc.driver.OracleDriver"); }
    catch (ClassNotFoundException exception)
    try
         Connection connection = null;
         out.println("connectiong the database");
    connection = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcsid","scott","tiger");
    out.println("connection getted");
         int rows = 0;
         String query_2 = "insert into mrdetails values(?)";
         String dob = date+month+year;
         prepstat = connection.prepareStatement(query_2);
         prepstat.setTimestamp(4,dob);
         rows = prepstat.executeUpdate();
         out.println("data updated");
    catch (Exception exception3)
    out.println("Exception raised"+exception3.toString());
    }

    To insert date values into a database, you should use java.sql.Date. If it also has a time component, then java.sql.TimeStamp.
    Your use of prepared statements is good.
    You just need to convert the parameters into a date.
    One way to do this is using java.text.SimpleDateFormat.
    int rows = 0;
    String query_2 = "insert into mrdetails values(?)";
    String dob = date+"/" + month+ "/" + year;
    SimpleDateFormat sdf = new SImpleDateFormat("dd/MM/yyyy");
    java.util.Date javaDate = sdf.parse(dob);
    java.sql.Date sqlDate = new java.sql.Date(javaDate .getTime);
    prepstat = connection.prepareStatement(query_2);
    prepstat.setTimestamp(4,sqlDate);
    rows = prepstat.executeUpdate();
    out.println("data updated");Cheers,
    evnafets

Maybe you are looking for