I am getting a Date from my xml using xpathsnippet funciton and it returns the d

I am getting a Date from my xml using xpathsnippet funciton and it returns the date as a TEXT field.

I want to convert it back to Date to insert it in the db.

todate() function does not seem to work for me since it returns an integer and not a date.

None of the other date functions take input as a text and give output as date..

Is there any such function?...

OriginalPostID-61770

OriginalPostID-61770

  Discussion posts and replies are publicly visible

Parents
  • Hello Annelise, I now have converted my Date Obtained to dateTime and I am trying to insert it in the db which has timestamp(6) as the data type in Oracle DB.

    But shows me 12 a.m. always as time, although the time is not 12 a.m.

    The date part is fine.

    I am doing the following:-

    datetime(split(left(ri!dateText, 10), "-")[1], split(left(ri!dateText, 10), "-")[2], split(left(ri!dateText, 10), "-")[3],split(left(ri!dateText, 13), "T")[2],split(left(ri!dateText, 19), ":")[2],split(left(ri!dateText, 19), ":")[3])

    For .e.g 2013-04-01T18:04:15.000Z gives me 4/1/2013 2:04 PM in the rule but in the db it gives me 01-APR-13 12.00.00.000000000 AM always.

    How do I get the exact time in db as well.

    2.04 p.m. in db too.

    Also, I noticed that 18:04 is converted 2:04 p.m. Seems like it is converting date in GMT time when we use dateTime function?
Reply
  • Hello Annelise, I now have converted my Date Obtained to dateTime and I am trying to insert it in the db which has timestamp(6) as the data type in Oracle DB.

    But shows me 12 a.m. always as time, although the time is not 12 a.m.

    The date part is fine.

    I am doing the following:-

    datetime(split(left(ri!dateText, 10), "-")[1], split(left(ri!dateText, 10), "-")[2], split(left(ri!dateText, 10), "-")[3],split(left(ri!dateText, 13), "T")[2],split(left(ri!dateText, 19), ":")[2],split(left(ri!dateText, 19), ":")[3])

    For .e.g 2013-04-01T18:04:15.000Z gives me 4/1/2013 2:04 PM in the rule but in the db it gives me 01-APR-13 12.00.00.000000000 AM always.

    How do I get the exact time in db as well.

    2.04 p.m. in db too.

    Also, I noticed that 18:04 is converted 2:04 p.m. Seems like it is converting date in GMT time when we use dateTime function?
Children
No Data