on 02-21-2017 9:48 AM
Hello,
please, could you help me with creating formatted search in OINV documents ? I would need to show OINV.CreateTS in format hh:mm:ss. Now it is only in format hhmmss. I´m able to convert it , but I cannot display the right value for only one OINV.DocNum.
SELECT STUFF(STUFF(STUFF(T0.CreateTS, 1, 0, REPLICATE('0', 6 - LEN(T0.createTS))),3,0,':'),6,0,':') from OINV T0
Thank you, regards
Martina
This query work for me in HANA:
SELECT TO_NVARCHAR(TO_TIME(LPAD(T0."CreateTS",6,0), 'HH24MISS')) AS FormattedTime
FROM OPCH T0;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh my God,
I was really near the end :-).
Thank you, Johan,
regards
martina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martina,
You can use the formatted search parameter format:
select STUFF(STUFF(STUFF(T0.CreateTS, 1, 0, REPLICATE('0', 6 - LEN(T0.createTS))),3,0,':'),6,0,':')
from OINV T0
where T0.DocNum = $[OINV.DocNum]
Regards,
Johan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amar,
HANA does not have the STUFF function, and possibly also not the REPLICATE function. Please check this post for an alternative to the STUFF function.
Regards,
Johan
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.