How to manipulate Date in Spark dataframe|from_unixtime | to_date | current_timestamp | current_date

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 7

  • @Sonuyadav-um9fj
    @Sonuyadav-um9fj ปีที่แล้ว +1

    crystal clear sir 👌

  • @prakashmonu007
    @prakashmonu007 3 ปีที่แล้ว +2

    Thanks for the information. Clear and simple.

  • @Fun_Learn_Win
    @Fun_Learn_Win 3 ปีที่แล้ว

    Sir if u want both year and month in one column then how can we write that command can u plzzz help me...

  • @mattanishanth
    @mattanishanth 3 ปีที่แล้ว +1

    Could you explain Why did you divided by 1000 to covert it to seconds.

    • @ProeduOrganization
      @ProeduOrganization  3 ปีที่แล้ว

      Hey. We are using from_unixtime() function which accepts seconds.
      from_unixtime() is used to convert the Unix timestamp to a String representing Date and Timestamp, in other words, it converts the Epoch time in seconds to date and timestamp.
      Having said that... In our example the time is in milliseconds and that's why we divided the same by 1000.