Questions tagged [date]

A date is a reference to a particular day represented within a calendar system, and consists of year, month and day.

Filter by
Sorted by
Tagged with
0
votes
2answers
1k views

date displays wrong

I am trying to display a date in the frontend. Currently the code calls the date like so <?php echo $date->date('m-d-Y', $_item->getCreatedTime()); ?> the date in the database is: 2017-...
4
votes
4answers
4k views

Magento 2.1: Product date validation prevents saving “Make sure the To Date is later than or the same as the From Date.”

Version: Magento 2.1 I cannot update or save a product due to this validation message: Make sure the To Date is later than or the same as the From Date. I assume it is referring to "Set Product ...
1
vote
1answer
413 views

Issue in applying Date filter on collection

I have an attribute with code "open_date", for customer address. data is being saved in db in format 29/01/2017, I am trying to apply filter to get store opening in next two weeks. What I have tried ...
14
votes
2answers
6k views

How to change date format of magento 2 admin grid filter without using ui component?

Below is some_grid_block.xml , How can I change date format in calendar filter. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
3
votes
0answers
113 views

Date format in the customer account dashboard

The date in the customer account dashboard in my Magento store is in the format of mm/dd/yyyy now, that is the date in the recent orders list is in above format. I want it to be displayed in the ...
5
votes
4answers
4k views

How do I create date input field with calendar in Magneto2? [SOLVED]

I want to create a date input field with calendar control where I can change year and month by drop down.
1
vote
1answer
520 views

Coupon expiration date not working

In Magento CE 1.9.2.4 I use an extension who creates coupons for birthdays in a "Shopping Cart Price Rule". These coupon are generated with an expiration date. The coupon works except that Magento ...
0
votes
1answer
82 views

Change expected delivery date

I display the expected delivery date on our products, using the following line: <?php if (in_array($_product->getData('delivery_eta'), array('2010-01-01 00:00:00','12-31-2099'))):?> I want ...
6
votes
0answers
1k views

Magento 2: Get Order Information Outside Magento Issue for Date

I have below script, trying to get all Orders. I have issue with Date. That i have solved using https://github.com/magento/magento2/issues/7560 //place this before any script you want to calculate ...
2
votes
4answers
1k views

Filter magento Orders by From & To Date in custom page

magento site : www.1234.com we are displaying all the orders in page : www.1234.com/php/site6/date.php , user can able to see all orders only when user login to date.php page. in date.php page, ...
0
votes
1answer
878 views

ERR (3): Warning: date() expects parameter 2 to be long

What is not correct about this statement? It came from the theme developer's files. ERR (3): Warning: date() expects parameter 2 to be long, object given in /home/WEBSITE/public_html/app/code/local/...
0
votes
2answers
899 views

Date filter wrong. Magento always converts the start/end date in a wrong format (UTC)

If I pull up a sales report and filter shipped by 6/1/16 - 6/30/16 I get a weird result (doesn't match a 3rd party report). When I inspect the final sql query Magento sends to the database I noticed ...
1
vote
0answers
90 views

Restricting Dates Using Custom Options - Input Type Date

I'm looking to add in an estimated delivery date field on to the product pages of my magento store - I'm currently using a custom option within the product to control this with the date input type. ...
6
votes
4answers
27k views

Magento 2: How to get current date, date time with format in .phtml file?

I already referred Magento 2 Get Current Store Date Time But how to use directly in .phtml file? Can able to get Date, DateTime & Also able to set it's format?
2
votes
1answer
7k views

Magento 2 : How to change default date format every where in magento?

I want to change the default date format like mm/dd/yy to dd/mm/yy for en_us locale in admin as well as front-end. Don't want to change the locale for that.
1
vote
0answers
439 views

magento 2 : Data tool migration transform date/time

I have a problem with the tool for the migration of data. My old magento use 1.7.0.2 end my new magento use 2.1. Actually, my column purchase date are transformed with strange differences. I ...
1
vote
2answers
320 views

Adding Time to SpecialToDate

Magento's SpecialToDate does not include a time stamp so any deal runs until midnight. What I would like to do is to be able to set the time as well as the date. I was thinking of changing the ...
4
votes
1answer
699 views

Magento 2 inline edit date issues

In magento2 Inline Edit date issues while i edit the record it display current date instead of my date My Ui component <!-- Date Column --> <column name="date" class="Magento\Ui\...
0
votes
3answers
93 views

Date new stock displayed wrong

We load data from our supplier about the date when new stock will arrive. The date is loaded like: 07-12-2016, which is 12 July 2016 and not 7 December 2016. I use following code to load the date: ...
0
votes
2answers
588 views

Datepicker is not show current date in magento grid module

Here is my code : $not_allowed_date=$fieldset->addField('not_allowed_date', 'date', array( 'name' => 'not_allowed_date', 'label' => Mage::helper('po')->__('Not ...
1
vote
1answer
949 views

Change sorting order to descending

In my website, sorting is in asc for all sorting option but if I select "Sort By Date" (created_at) I want it go sort on desc order. How do I do it? Also I have a theme installed. Below is the code ...
1
vote
1answer
1k views

Magento change `updated_at` field for product by id

I need to change the updated_at column value for product using it's id. I've already tried next pieces of code: $productIds = [26957]; $m = Mage::getSingleton('catalog/product_action'); $m->...
3
votes
2answers
769 views

How to change magento date/time

I am working on a magento custom module , and trying to test if the emails are sent properly , the module sends emails after 48 hours of an event , how do i modify the magento date time to test if ...
1
vote
1answer
33 views

Google trusted store checkout customization

I am using the code below to get the delivery date for trusted store badge <span id="gts-o-est-delivery-date"><?php echo $deliveryDate=Date('Y-m-d', strtotime("+7 days")); ?></span&...
0
votes
1answer
4k views

magento 2: How add time to datepicker in backend

I'am using magento 2.0.5 and I want to add date field with time which saves date as well as time in database for entity. I had tried this code to add new field in my module. $fieldset->addField('...
0
votes
3answers
2k views

How magento stores date in created_at field

I am working on cron extension in which i need to use difference of time. While working on this extension i observed one thing that magento has some difference in time while saving data in the table. ...
1
vote
1answer
746 views

display timer countdown according to attribute value

right now i am displaying same countdown timer by default in all product view pages using below code. but i need different countdown timers in every product pages according to value we set for the ...
9
votes
3answers
7k views

Magento 2 - Best practice to get current date

I have to save an updated_at attribute of a custom entity and to know which is the best practice I took a look at how Magento 2 handles it. I looked at the \Magento\Eav\Model\Entity\Attribute\Backend\...
2
votes
2answers
2k views

Timer countdown in product view page

I want to display timer countdown in product view page. how to achieve this ?
1
vote
0answers
387 views

Product Special Price with hh:mm:ss

How to add hh:mm:ss for the special price date in magento.1.9?
0
votes
2answers
775 views

Disable the Product once timeout ends

we need an option in backend > attributes to set "timeout" for each product. we want to display the timeout in view page. something as below : after the timeout ends, automaticlly Product status ...
0
votes
1answer
54 views

Add +5 days to getOrderDate()

If I use <?php echo "Valid until: "; echo strtolower(date('j. M. Y', strtotime($this->getPdfHelper()->getOrderDate()." +5 days")))?> I get proper result, but month is displayed in ...
9
votes
3answers
22k views

Magento Filter collection by create times (today, yesterday, week, hour etc)

I have a custom collection that I wish to filter by created date and het entries created "yesterday" Collection Entries //dates are set in controller using setCreatedTime(Mage::getModel('core/date')...
0
votes
1answer
160 views

Report period - add addtional selection “week”

I want to extend the period selection (day,month,year) with an option "week". I can add following function to my Grid.php: public function getPeriods() { return array( 'day' => Mage::...
0
votes
6answers
1k views

Magento 1.9.x Product View > Show Last Order Date

I'd like to show the "date of the last order" on the view.phtml product page. So far I've discovered "getCreatedAtStoreDate" from "design/template/sales/order/history.phtml. But when I include these ...
4
votes
3answers
2k views

Magento 2: How to use Zend Date

In Magento 1 we are using zend_date in a following manner new Zend_Date(date, 'MM-dd-Y'); or new Zend_Date(date('M-01-Y', strtotime("+1 months", strtotime(date("Y-m-d"))))); But how can I use ...
0
votes
1answer
370 views

Price Rule Condition: Product is new

Is it possible to not use a fixed date but just the "current date" as a condition for a price rule for promotions? For example let's say I want to give a 10% discount to all new products. I would ...
3
votes
1answer
5k views

Problems with DateTime: failed to parse time string

I'm getting very confused here. I made a module which has an adminhtml form which contains a date field. I'm adding it like this: $quotaFieldset->addField( 'quota_expiry', '...
4
votes
2answers
3k views

Magento 2 set created time and updated time in database

I am using php function now() to set current date and time.But getting an error. So please help me how can I set current date time in magento 2.
1
vote
1answer
3k views

Magento 2 - How to set format datetime for all system

How to set format datetime for all system ? Such as: date attributes of entity(product, customer etc), import, export etc Anyone know, please show me step by step.
2
votes
2answers
1k views

Magento 2 - Problem with datetime attribute product

In Magento2 : When I saved date attribute with time is the same picture below. After I saved it only save date and get no time. Any know reason and how to fix it? In database: after saved When I ...
2
votes
2answers
2k views

Translate $date into Dutch

I want to translate the displayed date into Dutch. My current code looks like this: <?php $post = $this->getPost(); $date = Mage::getModel('core/date'); ?> <span class="date"><?...
0
votes
1answer
32 views

View Date-based Products

I run a food delivery business where we make fresh food, package it, and delivery it locally each day. Each day we offer a different set of options. For example, on Monday there might be Entree A, ...
1
vote
1answer
3k views

How to show fedex estimated delivery date to be displayed along with the shipping option on my checkout page

Currently in checkout process, in shipping method section Fedex Shipping method showing as - Federal Express Ground - $13.86 Standard Overnight - $36.87 2 Day - $36.87 I would like the estimated ...
2
votes
0answers
260 views

How to display Date attribute in layered navigation?

I want to display Date attribute in layered navigation. Magento default date attribute configuration doesn't allow Show in Layered Navigation in frontend value to be set.How can I do that?
5
votes
1answer
2k views

Magento checking order updated_at using Magento date and time

we are trying to filter out orders that were created longer than 60 minutes ago with status pending. We are having some problems with the date/time functions We tried: - date('Y-m-d H:m:s') and ...
1
vote
1answer
860 views

Order Date is correct on the order itself in Admin but incorrect in the Order Confirmation Email (it shows exactly 7 hours more)

The orders show the correct Order date in Admin but incorrect Order date (time) on the Confirmation Email. The time on the Confirmation Email is exactly (to the second) 7 hours more. An example: ...
0
votes
1answer
144 views

Create a pricing calendar - per product

I'm looking to build a pricing calendar for each product (i.e. be able to plan in advance pricing for products). Has anyone had any experience building something like this, or does anyone have any ...
0
votes
1answer
647 views

0000-00-00 00:00:00 datetime is showing incorrectly in magento admin grid filter

I am using datetime grid filter in my custom module grid. I use following code- $this->addColumn('created_at', array( 'header' => Mage::helper('po')->__('Created At'), ...
2
votes
1answer
815 views

Show date attribute in layered navigation

How to show "date" attribute in Layered Navigation in Frontend?