Jump to content

Can Someone Help Me With This?


canbyave

Recommended Posts

[color=#333333][size=4][b]
DATE_DIFF Function In informatica (TO_DATE conversion error)[/b][/size][/color]

[color=black][font=arial]
DATE_DIFF(P,Q, 'HH24' ) and DATE_DIFF(P,Q, 'MI' ) is not working

I have two input fields A and B where the data type is String and the values are
A- 07:30
B- 20:00 (24 hr format)
- I need to calculate the time difference between the two fields A and B which means - the result should be 14.30 hrs.

I converted the two string fields to TO_Date as

P-->TO_DATE(A, 'HH24:MI') and Q-->TO_DATE(B, HH24:MI')

Now, DATE_DIFF(P,Q,'HH24')||DATE_DIFF(P,Q,'MI') -- Data type as Double.

Still I get the error as Invalid string conversion to date[/font][/color]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...