t;
>>>>> import java.text.SimpleDateFormat
>>>>> import java.util.Date;
>>>>>
>>>>> val format = new SimpleDateFormat("-M-dd hh:mm:ss")
>>>>>
>>>>> val testsql=sqlContext.sql("select
>&g
>>
>>>> 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
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
elect
>> column1,column2,column3,column4,column5
>> ,'%s' as TIME_STAMP from TestTable limit 10".format(format.format(new
>> Date(
>>
>>
>> Thanks
>> Sri
>>
>>
>>
>> --
>>
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
> 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
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.
>
>
.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.
--
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