Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

aarohipatel
Contributor

SQL Query help

Hi ,

I am trying to write the following Oracle database query in SQL Server database

to_date(to_char(GETDATE(), 'DD-MON-YYYY'), 'DD-MON-YYYY')

Please suggest.

Thank you

1 Solution

Accepted Solutions
aarohipatel
Contributor

Re: SQL Query help

I am using this and it works for me:

format(created_date,'dd-MMM-yyyy')

5 Replies
sinanozdemir
Valued Contributor III

Re: SQL Query help

Hi,

See the below:

Capture.PNG

Thanks

aarohipatel
Contributor

Re: SQL Query help

Hi Sinan,

The end result should be in the format 'DD-MON-YYYY'

Note: The datatype of getdate is : Datetime2

vishsaggi
Esteemed Contributor III

Re: SQL Query help

use 106. From sinan expression use like

Convert(nchar, Getdate(), 106)

aarohipatel
Contributor

Re: SQL Query help

I am using this and it works for me:

format(created_date,'dd-MMM-yyyy')

vishsaggi
Esteemed Contributor III

Re: SQL Query help

Glad you figured it out.Close the thread accordingly.