Using a Hook to Display the Relative Date
Learn how to use a hook to display the relative date in a view.
We'll cover the following
Displaying the relative date
Suppose that we want to show the relative date in a view, as shown in the table below:
# | Name | Price | Created Datetime |
---|---|---|---|
1 | Apple Mac Pro Stand | 999 | 1 minute ago |
2 | Apple Macbook Bro 2019 | 1999 | 1 minute ago |
3 | ThinkPad X1 Carbon 2019 | 1700 | 1 minute ago |
Get hands-on with 1200+ tech skills courses.