How to convert this oracle query to typeorm?

Viewed 657

I was building an application in NestJS and I need to get the date from the Oracle, but I don't know how convert this query:

SELECT TO_CHAR
    (SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "NOW"
     FROM DUAL;

In a TypeORM query.

Can you help me?

1 Answers

I found this way to get what I wanted:

await getManager().query(`SELECT TO_CHAR(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "NOW" FROM DUAL`);
Related