Shawn Weeks created HIVE-20012:
----------------------------------

             Summary: Implement SQL Standard Date and Timestamp Functions
                 Key: HIVE-20012
                 URL: https://issues.apache.org/jira/browse/HIVE-20012
             Project: Hive
          Issue Type: New Feature
            Reporter: Shawn Weeks


I've looked around and haven't seen an existing ticket on this. Many times you 
need to convert from arbitrary string formats to a date or a timestamp. The 
current method using the unix_timestamp function doesn't support milliseconds 
and is a bit clunky. I propose we implement a to_date and to_timestamp function 
that behave like the following. It may also be useful for the to_timestamp 
function to behave like the existing to_date function and convert Hive's 
default timestamp string into an actual timestamp.
{code:java}
select to_date('01-01-2000','dd-MM-yyyy');

2000-01-01

select to_timestamp('01-01-2000 13:00:00.000','dd-MM-yyyy HH:mm:ss.SSS')

2000-01-01 13:00:00.000{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to