Reputation: 77
Is there is any equivalant function to convert this kind of SQL timestamp using spark sql.
TO_CHAR(SYSTIMESTAMP, "yyyy-MM-dd HH24:mm:ss)
TO_CHAR(SYSTIMESTAMP, "yyyyMMddHHmmss)
Upvotes: 1
Views: 2167
Reputation: 4224
You can try:
select date_format(current_timestamp(), "yyyy-MM-dd HH:mm:ss");
select date_format(current_timestamp(), "yyyyMMddHHmmss");
Upvotes: 3