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
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.
0
votes
0answers
33 views

Magento 2 How to add Delivery date function in both admin and frontend

In magento 2 I need to add Delivery date option in both frontend page and admin page. Is it possible to update by the code?
3
votes
1answer
3k views

How to change date format for Order Invoices In Magento 2

I want to change the date format for admin in Sales->Order(view order)->Invoices tab in 24H format I tried to find how this grid is rendered and i found(with template path hinth) that this table is ...
4
votes
4answers
7k views

Show product only within a date range (between start date and end date)

I want to create a product with start date and end date. Once the end date comes the product should be hidden from the product listing. Are there any methods to complete this task? I tried with ...
0
votes
0answers
82 views

date of birth value doesn't show up in account information in admin panel on magento 1.9

I am trying to fetch the date of birth of end user but i show there no date of birth enter or saved in admin. <div class="dob-full" style="display:none;"> <input type="hidden" id="<?...
2
votes
0answers
60 views

Magento : How to Solve Fatal Error SetDateRange() [closed]

When I try to filtering report by date range in admin, It show me error like this. Fatal error: Call to a member function setDateRange() on boolean in app/code/core/Mage/Reports/Model/Report.php ...
1
vote
2answers
326 views

Changing Date in Magento 2

How can I change the date in magento 2? Not the format, but the date. For example, I want to post some article with the date of a week ago, like 20 march. How can I do this? I have searched for it ...
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?
4
votes
4answers
11k views

How to add 7 days to current date?

I need to save to db current date & "current date + 7days" values. For this I'm using following function. But how to add 7 days to this. Mage::getModel('core/date')->date('Y-m-d H:i:s'); ...
2
votes
1answer
3k views

Disable future dates in magento datepicker

I am using magento datepicker. i have an array dates which i want to disable that days in the magento datepicked. for example 08/29/14 is holiday. so i want to make the date as disable so the user ...
0
votes
1answer
31 views

The custom function is returning error when added in a controller

I have a custom function in a controller file, the function basically is to be used for converting the time into a different custom format, for example, if the time is indicating the date of yesterday,...
0
votes
1answer
60 views

Sales Reports are a day off

This is a really odd problem that I can't seem to find the answer anywhere - any help would be greatly appreciated. I'm trying to run a sales report by a daily basis however this morning I had this ...
0
votes
1answer
916 views

Convert Datetime to Date

I am having trouble pulling the date out of a datetime in magento. Currently the date gets called using: $_formatDate = Mage::app()->getLocale()->getDateTimeFormat( ...
1
vote
2answers
828 views

Collection filter date range not working

I tried to find the collection that has a range created between 4 hours, but somehow it doesnt show the right collection size, it always returns '0', here's how i use the filter: $to = date('Y-m-d H:...
0
votes
1answer
121 views

How add current date and text

Need to add today date and 2020096 in 'number' => $consignmentNo, so it will be 201803222020096$consignmentNo $tracks = array( '1'=>array( 'carrier_code' => $carrier_code, ...
1
vote
1answer
116 views

Adding future date/time to TrustPilot script in Magento Packing Slip

I am about to add a "Structured Data Snippet" to my Magento packing slip emails, which should include a future date. The snippet looks like this (example data): <script type="application/json+...
1
vote
1answer
142 views

How to get CMS block ids between dates?

Going forward with my customization I would like to get CMS blocks using a filter: My code to get the collection: $today = Mage::getModel( 'core/date' )->date( "Y-m-d" ); $collection = ...
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', '...
2
votes
1answer
2k views

Magento : Filtering Date Issue on Custom Grid

This is my column code: $this->addColumn( Mage::getModel('catalog/product')->formatUrlKey($key), array( 'header' => Mage::helper('core')->__($label), 'index' =>...
4
votes
1answer
7k views

Set created_at when programatically creating a Magento order

I'm struggling to set the order date when creating a magento order programatically. Here is what I'm trying to use: $orderObj->setData('created_at', $date); $orderObj->setUpdatedAt($date); but it ...
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 ?
0
votes
1answer
38 views

Change layout var date email

Inside a transactional email whe print a date attribute, using the following code: {{var quote.followup}} This only displays the date as 2017-12-11 00:00:00 How can I change that into Mondag 11 ...
1
vote
2answers
73 views

Magento display date into multi values

I load the following code: <?php if (isset($item['delivery_eta'])): ?> <?php $date = DateTime::createFromFormat('m-d-Y', $item['delivery_eta']); if (!$date) { $date = DateTime::...
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.
0
votes
1answer
196 views

php date always displayed in Dutch [duplicate]

I currently use the following code to display some date inside my Magento store: setlocale(LC_TIME, 'nl_NL'); $today = new Zend_Date($_product->getData('delivery_eta'), 'MM-dd-yyyy'); $date = ...
0
votes
2answers
410 views

one month previous day in magento

I want new date from current date, difference of 30 days. $dt = date("Y/m/j",strtotime("-1 month")); and $firstDayOfPrevMonth = date("01.m.Y", Mage::getModel('core/date')->timestamp(strtotime('...
1
vote
0answers
108 views

Magento 2: Send email based on timezone selected by customer

I am developing extension in which I need to send email on base of selected Timezone by the customer. I have set a cron which is working fine, however, I confused about to send email on the base of ...
5
votes
1answer
2k views

Add Date Picker and/or Validation To System Config Form Field Array

I'm building a module to handle business hours for a physical retail store. The idea is to have configurable fields for the business hours on each day of the week so they can be changed seasonally. ...
0
votes
2answers
904 views

How to get Subscriber based on from date in Magento 1.9?

I am able to get all subscriber but there is no date filter in Magento for subscribers. Can anyone tell me how to get subscriber based on date in magento?
3
votes
1answer
1k views

How to solve date and time problem in magento? [closed]

I am using datepicker in magento form This is my code: $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); $fieldset->addField('...
2
votes
0answers
388 views

Date Formatting Options - getCreatedAtFormatter($format)

The new order transactional email template passes in the number "2" and creates the format including the time. I wish to display just the Date. I would like to know what the different format options ...
2
votes
1answer
495 views

Magento : Catalog Price Rule Date Not Working Properly

I want to give some discounts for some products. Discount should start from a certain date, let's say 20/04/2017. This date is working fine if I use special price field in product management. But ...
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:...
2
votes
0answers
878 views

How to change date format for backend in Magento 2 [duplicate]

On Order-Sales tab we have Filters. Here we have Purchase Date which it's a date picker, and by default, the date format it's mm/dd/yy. I want to make this date filed to be dd/mm/yy but i can't ...
1
vote
1answer
512 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
0answers
140 views

How to fix backend date always showing 2020?

I've looked far and wide for an answer to this problem and could not find one. Perhaps you can help. The Problem: In the Magento Admin Backend Panel, I am trying to set the Special Price Date so that ...
1
vote
1answer
352 views

Magento 1.9 remove time from order confirmation

In my order confirmation, I have this code echo Mage::helper('core')->formatDate($_order->getData('created_at'),Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true); and the output is Order ...
1
vote
0answers
805 views

Magento 2 : How to Add Date Validator on Custom Input Form Js File

I have created a custom input on the checkout page, I want to add date validator from js but I can't. I already tried this custom js: $( "#co-shipping-method-form" ).validate({ rules: { ...
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 ...
2
votes
2answers
8k views

Magento Adminhtml date picker on custom page (non-form)

I'd like to add a date picker to a custom input field on a .phtml. file which is loaded by Block reference, i.e: Controller public function indexAction() { $this->loadLayout(); $this->...
1
vote
1answer
575 views

Call to a member function getId() on null date.phtml

I want to call a date.phtml template in catalog/product/view.phtml but i have the error: Call to a member function getId() on null in ...PATH line 28 and this line there is : <?php $_optionId = $...
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-...
1
vote
1answer
411 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 ...
3
votes
0answers
111 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 ...
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, ...
5
votes
2answers
4k views

Adminhtml form date input type default format wrong

I've managed to create an Adminhtml form extending \Magento\Backend\Block\Widget\Form\Generic. I've added each field inside _prepareForm() method using $fieldset->addField() method. One of the ...
1
vote
2answers
6k views

How to disable given date in default calendar?

I have a table in the database which contains some dates. I want to disable those dates in magento default calendar. The calendar is in front-end checkout process (used to add delivery date for the ...
2
votes
4answers
5k views

Magento registration date of birth in one field

I want that in my customer regitration form date of birth field to be in one field. Now it's in 3 fields. So I have <div class="input-box customer-dob"> <input type="text" id="<?...