Calcite equivalent for Select CONVERT date formatter

2020-02-19 Thread Suresh Krishnan
Hi Team, We are having trouble finding the right approach to convert the date fields using calcite. We are looking for something that will give us the below SQL equivalent SELECT CONVERT(varchar(12), GETDATE(), 101) - 06/29/2009 We have tried creating a rexNode using the

Re: Calcite equivalent for Select CONVERT date formatter

2020-02-20 Thread Danny Chan
>From varchar to date? Suresh Krishnan 于2020年2月20日 周四下午1:55写道: > Hi Team, > > We are having trouble finding the right approach to convert the date > fields using calcite. > > We are looking for something that will give us the below SQL equivalent > SELECT CONVERT(varchar(12), GETD

Re: Calcite equivalent for Select CONVERT date formatter

2020-02-20 Thread Julian Hyde
Which DBMS is that SQL for? In standard SQL and Calcite (and Oracle [1]), the CONVERT function changes the encoding of a character string. But I don’t think you mean that. Julian [1] https://docs.oracle.com/cd/B28359_01/server.111/b28286/functions027.htm#SQLRF00620

RE: Re: Calcite equivalent for Select CONVERT date formatter

2020-02-20 Thread Hrudaya Reddy
O format) https://www.w3schools.com/sql/func_sqlserver_convert.asp Regards, Hrudaya -Original Message- From: Julian Hyde Sent: Thursday, February 20, 2020 10:21 AM To: dev Subject: [EXTERNAL] Re: Calcite equivalent for Select CONVERT date formatter Which DBMS is that SQL for? In standard SQL and Calcit

RE: Re: Calcite equivalent for Select CONVERT date formatter

2020-02-20 Thread Danny Chan
t; > -Original Message- > From: Julian Hyde > Sent: Thursday, February 20, 2020 10:21 AM > To: dev > Subject: [EXTERNAL] Re: Calcite equivalent for Select CONVERT date formatter > > Which DBMS is that SQL for? > > In standard SQL and Calcite (and Oracle [1]), the

RE: RE: Re: Calcite equivalent for Select CONVERT date formatter

2020-02-23 Thread Hrudaya Reddy
I think this should help us Danny. Thank you. Regards, Hrudaya -Original Message- From: Danny Chan Sent: Thursday, February 20, 2020 8:13 PM To: dev@calcite.apache.org Subject: [EXTERNAL] RE: Re: Calcite equivalent for Select CONVERT date formatter Is this [1] what you need ? [1