Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am using below
Timestamp#(Date("RDate")&' '&Time#(Right("RTime",8),'hh:mm:ss'),'MM/DD/YYYY hh:mm:ss') as "R Date Timestamp"
am getting output as 10/09/2017 78865741
but I need in in 'MM/DD/YYYY hh:mm:Ss' this format it is giving number I need hh:mm:ss
Rdate values: 10/09/2017
RTime values: 78865741 \
how to convert this?
Hi Sony,
your RTime field is being treated as a number of whole days - to convert to seconds you need to divide by 86400 (the number of seconds in a day)
For example:
Timestamp#(Date(RDate)&' '&Time(Right(RTime,8)/86400,'hh:mm:ss'),'MM/DD/YYYY hh:mm:ss') as [R Date Timestamp]
Marcus
Hi Sony,
your RTime field is being treated as a number of whole days - to convert to seconds you need to divide by 86400 (the number of seconds in a day)
For example:
Timestamp#(Date(RDate)&' '&Time(Right(RTime,8)/86400,'hh:mm:ss'),'MM/DD/YYYY hh:mm:ss') as [R Date Timestamp]
Marcus
How about a simpler expression.
TimeStamp(Date#(RDate) + Time#(Right(RTime, 8), 'hh:mm:ss'), 'MM/DD/YYYY') AS [R Date Timestamp]
But we can only test this in a reliable way if we get some real data for RDate and RTime. Are they QlikViewq dual fields? Or just strings from an external source?
Try below
Date(RDate)&' '&Time(RTime)
what is converted valued of 78865741 in time?
Regards,
not working
not working
can provide sample file.
What output you are getting after applying above expression?
Regards,
can u provide sample data so that it is eay to resolve ur problem..
Please use
TIMESTAMP#(RDate, 'MM/DD/YYYY hh:mm:ss')
in order to transform the field containing the data.
Further you may convert this into a format, in which it should be shown:
TIMESTAMP(TIMESTAMP#(RDate, 'MM/DD/YYYY hh:mm:ss'), 'YYYYMMDD hh:mm')
RTime values are in minutes or seconds?