How can I add date and time to my homepage with special font?

olivervestlund
Tourist
13 0 1

IMG_6683.jpeg

Hi, i am wondering if there is any way of adding the date and time to the home page? I have searched for very long, but nothing to find out there. I have seen some stores that have it. I would also like to have a special font, is that possible? Thanks!

Replies 8 (8)

Sweet_Savior_3
Shopify Partner
1158 94 112

Hello @olivervestlund 

 

Would you like to show the time and date according to your time zone ? Can you share the demo site ?

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
olivervestlund
Tourist
13 0 1

Hi, i want it to show the and date for in the timezone of the visitor. Here is a preview: https://r1ew0d5a2qrp2zuf-77159104851.shopifypreview.com

Sweet_Savior_3
Shopify Partner
1158 94 112

Thanks but can you share the demo site of showing time and date ?

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
olivervestlund
Tourist
13 0 1
Sweet_Savior_3
Shopify Partner
1158 94 112

Thanks

 

For the given site the date and time is a customer setup. So to setup for users location these needs to be hard coded.

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
olivervestlund
Tourist
13 0 1

Ok, so i might just not do it haha 🙂

jthk116
Shopify Partner
38 3 8

You can try using liquid date filter:
{{ "now" | date: "%Y-%m-%d %H:%M" }}

Here's some references to look into and play with:
https://www.shopify.com/partners/blog/liquid-date-format
https://shopify.dev/docs/api/liquid/filters#date

Please like and accept solution if I was helpful, thanks!

Jay K.
olivervestlund
Tourist
13 0 1

I will look into it, thanks!