Announcement

Collapse
No announcement yet.

JS Date conversion function needed..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JS Date conversion function needed..

    Hello all,

    I have a channel that reads data from a DB and sends it via a HL7-Message.
    In the Database a timestamp-value is in this form:2008-01-15 11:21:11.0 but in the hl7-message it should be in this form: 20080115112111+0000. So does anyone know such kind of javascript function which does the job?

    Thanks and greets!

    Svetlomir

  • #2
    Re:JS Date conversion function needed..

    DateUtil might do what you are trying to do.

    Comment


    • #3
      Re:JS Date conversion function needed..

      I'm using something like:

      DateUtil.getCurrentDate('dd/MM/yyyy')

      take a look to: http://java.sun.com/j2se/1.4.2/docs/...ateFormat.html to see all the date/time formatting options


      And you can use the date conversion funcions of your database to make the date format consistent between the message and the db




      Hope that helps

      Post edited by: quimicefa, at: 09/23/2008 01:10

      Comment


      • #4
        Re:JS Date conversion function needed..

        Thank you very much, it worked, thanks for your help!

        Comment

        Working...
        X