If you're doing in Scala per se - then you can probably just reference
JodaTime or Java Date / Time classes.  If are using SparkSQL, then you can
use the various Hive date functions for conversion.

On Tue, Apr 14, 2015 at 11:04 AM BASAK, ANANDA <ab9...@att.com> wrote:

> I need some help to convert the date pattern in my Scala code for Spark
> 1.3. I am reading the dates from two flat files having two different date
> formats.
>
> File 1:
> 2015-03-27
>
> File 2:
> 02-OCT-12
> 09-MAR-13
>
> This format of file 2 is not being recognized by my Spark SQL when I am
> comparing it in a WHERE clause on the date fields. Format of file 1 is
> being recognized better. How to convert the format in file 2 to match with
> the format in file 1?
>
> Regards
> Ananda
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to