Skip to main content

All Questions

Tagged with
-1 votes
1 answer
239 views

How to display a timestamp in DD-MMM-YYYY HH:MM:SS in hive

My data column has "2022-04-09 11:30:00" and i need to display it as "09-Apr-2022 11:30:00" i am not familiar with unix_timestamp
Yes_par_row's user avatar
2 votes
1 answer
272 views

python datetime gives one datetime, hive/java another when converting timestamp

I am attempting to figure out in python.. what is the native hive timestamp format that it can consume as a string in parquet.. I think python is giving me a good close way BUT.. i noticed my code is ...
Erik's user avatar
  • 3,080
0 votes
1 answer
132 views

Convert hive function(space, split) to Redshift syntax to generate a date series

I have a segment of code written in Hiveql that generates 3 columns, a index, a date, and a range of dates: drop table if exists date_list; create temporary table date_list as with seq as( select ...
lydias's user avatar
  • 841
1 vote
1 answer
186 views

Converting hive Timestamp functions to Redshift syntax

I need to convert a script written in hive-SQL to Redshift's SQL. I am stuck with the following piece: select date_format(date_add(date_sub(current_date,cast(from_unixtime(unix_timestamp(current_date,...
Sidhant Gupta's user avatar
0 votes
1 answer
575 views

Convert String column which has AM/PM to Timestamp in Impala

I have a column which has values in string type like below: 31-Oct-2016 12:00 AM 31-May-2015 12:00 PM I want to convert the above column values to timestamp in IMPALA. Tried with cast, to_timestamp ...
Shanti 's user avatar
1 vote
1 answer
407 views

how to converting string date in 'yyyy-m-dd' to 'yyyy-mm-dd' in Hive query?

I searched up and down but couldn't find anything that works. I have a date that is stored as a string in this format: '2021-9-01' so there are no leading zeros in the month column. This is an issue ...
user3486773's user avatar
  • 1,196
0 votes
1 answer
656 views

hive datetime formats

I need to convert 2019-07-12 22:30:00.000 to 7/12/2019. I have used from_timestamp(dintervalstart,'M/d/yyyy') where dintervalstart is the col holding these values in impala and got succeeded. Whereas ...
nvsk. avinash's user avatar
1 vote
1 answer
435 views

Hive/SQL Error when converting milliseconds to DDDD:HH:mm:ss

I have an output in milliseconds that is too big to be described in HH:mm:ss format, I will need to expand to DDDD:HH:mm:ss. The code I'm currently using only works on big numbers: select ...
lydias's user avatar
  • 841
1 vote
3 answers
3k views

epoch with milliseconds to timestamp with milliseconds conversion in Hive

How can I convert unix epoch with milliseconds to timestamp with milliseconds In Hive? Neither cast() nor from_unixtime() function is working to get the timestamp with milliseconds. I tried .SSS but ...
Goldie's user avatar
  • 164
1 vote
2 answers
895 views

HIVE converting unix timestamp for calculation

I'm trying to perform subtraction among timestamps and would like to convert the timestamps in forms that can be converted to minutes. I used regexp_replace to convert timestamp in such form: 2020-06-...
lydias's user avatar
  • 841
0 votes
1 answer
134 views

hive converting string to timestamp drops millisecond information

I am trying to convert following string to timestamp. however not able to figure out how to handle last milisecond part String: 2020-06-30T23:57:48.000-0400 following is working. howsoever it's ...
Gaurang Shah's user avatar
  • 12.6k
1 vote
1 answer
580 views

Convert dd/mmm/yyyy to yyyy-mm-dd

I have a date in this format: 08/Jul/2012:06:19:00 -0200 and I am trying to do select like: from_unixtime(unix_timestamp(substr(hiredate,0,10),'dd/MMM/yyyy HH:mm:ss'),'yyyy-MM-dd') But it's not ...
Anonymous's user avatar
  • 193
1 vote
1 answer
100 views

HIVE Time conversion issue

We are getting a time from src "2019-11-03 01:01:00". 2019-11-03 is the day light saving day. lets say this is the end_time. We have another column in hive table start_time. Logic to derive start ...
Dutta's user avatar
  • 673
0 votes
1 answer
3k views

Convert UTC timestamp to yyyyMMddHHmmss.SSS format in hive

I have a scenario like below in hive convert the current_timestamp to UTC. I am able to do so select to_utc_timestamp(current_timestamp, 'America/Los_Angeles)'; Result: 2020-02-04 10:00:06.162 ...
nmr's user avatar
  • 675
1 vote
1 answer
874 views

How to convert UTC to CST timestamp by retaining the milliseconds in data in Hive

I have a hive table in which the data with datatype timestamp is in UTC format. I have created a view on top of this table to convert UTC to CST with daylight savings. That conversion is working fine. ...
Amrutha K's user avatar
  • 204

15 30 50 per page
1
2 3 4 5