Categories: Magento

How to Get Current Date Time in Magento?

If you are looking to get the current date and time with specific format being used currently from the database then use the following code with specific syntax to get the information right away.


Mage::getModel('core/date')->date('Y-m-d H:i:s');

OR


date("Y-m-d H:i:s", Mage::getModel('core/date')->timestamp(time()));

Rohan pathak

Recent Posts

A World of Play: The Best Toy Shopping Experience in Noida

Toys are a gateway to imagination, creativity, and learning. Whether it’s a child’s first plush toy, a set of engaging…

7 hours ago

The Ultimate Guide to Finding the Best Toy Shops in Gurgaon

Toys are more than just playthings; they help children explore, learn, and develop essential life skills. From interactive sensory toys…

1 day ago

The Ultimate Toy Shopping Guide: Finding the Best Toy Store in Noida

Toys are more than just playthings; they are tools that foster creativity, motor skills, and cognitive development in children. From…

2 days ago

Exploring the Best Toy Shop in Delhi: A Blend of Fun, Learning, and Creativity

Toys play an integral role in a child’s growth and development. They spark creativity, encourage learning, and provide endless hours…

5 days ago

What Is a Progressive Web App? Why Would You Need One?

App usage is growing steadily without showing any signs of slowing down. Hence, it is no surprise that mobile applications…

1 year ago

7 Most Popular Paid Online Advertising Strategy

As the world has grown more digital, businesses have adapted themselves. An effectual adaptation includes online advertising. Offline advertising styles…

1 year ago