Re: spark sql current time stamp function ?

2015-12-07 Thread Ted Yu
t; >>>>> import java.text.SimpleDateFormat >>>>> import java.util.Date; >>>>> >>>>> val format = new SimpleDateFormat("-M-dd hh:mm:ss") >>>>> >>>>> val testsql=sqlContext.sql("select >&g

Re: spark sql current time stamp function ?

2015-12-07 Thread Ted Yu
>> >>>> val format = new SimpleDateFormat("yyyy-M-dd hh:mm:ss") >>>> >>>> val testsql=sqlContext.sql("select >>>> column1,column2,column3,column4,column5 >>>> ,'%s' as TIME_STAMP from TestTable limit 10".f

Re: spark sql current time stamp function ?

2015-12-07 Thread sri hari kali charan Tummala
al testsql=sqlContext.sql("select >>> column1,column2,column3,column4,column5 >>> ,'%s' as TIME_STAMP from TestTable limit 10".format(format.format(new >>> Date( >>> >>> >>> Thanks >>> Sri >>> >>&g

Re: spark sql current time stamp function ?

2015-12-07 Thread Ted Yu
elect >> column1,column2,column3,column4,column5 >> ,'%s' as TIME_STAMP from TestTable limit 10".format(format.format(new >> Date( >> >> >> Thanks >> Sri >> >> >> >> -- >>

RE: spark sql current time stamp function ?

2015-12-07 Thread Mich Talebzadeh
ensure that this email is virus free, therefore neither Peridale Ltd, its subsidiaries nor their employees accept any responsibility. From: Ted Yu [mailto:yuzhih...@gmail.com] Sent: 07 December 2015 15:49 To: kali.tumm...@gmail.com Cc: user Subject: Re: spark sql current time stamp function

Re: spark sql current time stamp function ?

2015-12-07 Thread Sri
> Thanks >> Sri >> >> >> >> -- >> View this message in context: >> http://apache-spark-user-list.1001560.n3.nabble.com/spark-sql-current-time-stamp-function-tp25620p25621.html >> Sent from the Apache Spark User List mailing list archive at N

Re: spark sql current time stamp function ?

2015-12-07 Thread Ted Yu
anks > Sri > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/spark-sql-current-time-stamp-function-tp25620p25621.html > Sent from the Apache Spark User List mailing list archive at Nabble.com. > >

Re: spark sql current time stamp function ?

2015-12-07 Thread kali.tumm...@gmail.com
.format(format.format(new Date( Thanks Sri -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/spark-sql-current-time-stamp-function-tp25620p25621.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --

spark sql current time stamp function ?

2015-12-07 Thread kali.tumm...@gmail.com
Hi All, Is there a spark sql function which returns current time stamp Example:- In Impala:- select NOW(); SQL Server:- select GETDATE(); Netezza:- select NOW(); Thanks Sri -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/spark-sql-current-time-stamp