Is it possible to convert a Datetime value to string in PL SQL? I should to do that to a IF in PL SQL
Asked
Active
Viewed 1,696 times
2 Answers
4
Use to_char(date, format)
e.g.
Select to_char(sysdate,'DD-MON-YYYY') from dual;
Stephen Caggiano
- 131
- 3
0
You can use like this:
SELECT
TO_CHAR(TO_DATE('20190811 10:44:11','YYYYMMDD HH24:Mi:SS'),'YYYYMMDD HH24:Mi:SS') YOUR_STRING_DATE
FROM
DUAL
Ersin Gülbahar
- 6,713
- 15
- 60
- 114