Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [date]

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

0
votes
0answers
18 views

Magento 2: Admin Order Date filter showing wrong result

I have been trying to filter admin order based on a date but getting the wrong result. I have try to filter Purchase Date from: 03-03-2019 and to: 03-03-2019 Expected result: Filter result ...
2
votes
0answers
23 views

Magento Frontend form date picker today date is wrong

I want to setup date picker in frontend form, and I did this currently, datepicker is shown in a frontend form only one issue is that when I click on today in datepicker it take the wrong date ...
0
votes
2answers
59 views

Model setData dateTime field set current date

I have an extension attribute for a dateTime field in sales_order table. What I want to do on a certain action is to set the value of this field to NOW(). How can I perform this? $order->setData(...
0
votes
0answers
29 views

Magento 1.9: How do we provide a filter for date range on the Magento front end?

We recently moved our site over to Magento 1.9. We provide recorded audios and videos through our store, both for sale and via a membership. Our customers frequently want to filter results by the ...
0
votes
0answers
24 views

Date / time format in Magento 1.9x

I am sending and retrieving data from the Magento 1.9x SOAP web service (v2). My question is which format are date / time fields passed in the SOAP api? Also, which timezone are dates processed in the ...
0
votes
0answers
13 views

Compare date of productstock not working in Magento 1.9

I currently use the following code, to check if the $productEta is in the future, based on the date of today. But that is not working well. Its a dynamic code, so I will provide the entire code: $...
1
vote
0answers
48 views

Magento 2 Ui Component Date Field Saves current date

Magento 2 Ui component Date Fields save the current date not saved the inputed date please show my below code Form <field name="active_from_date" formElement="date"> <argument name=...
0
votes
0answers
86 views

Schedule CMS block content change on a specific date

We have a CMS block on our front page and we would like to automatically change the content of it on Black Friday, for example. How could we do this?
0
votes
1answer
26 views

setCreatedAt Is not working

From the following script below, I dynamically add evaluations on the products, however I am not able to set the creation date from $review->setCreatedAt($data_avaliacao);. I already researched the ...
0
votes
1answer
86 views

Magento2 set timezone with mysql query

I am trying to get days difference between 2 dates with mysql query with DATEDIFF function for production_days column: $collection->getSelect()->joinLeft(array('cvo' => 'cp_vendor_order'), "...
1
vote
0answers
16 views

How to disable previous date for custom attribute in magento 2?

Step 1 : Add below input field whereever you need in .phtml file <div class="field street"> <label for="date_field" class="label"><span><?= /* @escapeNotVerified */ __(...
0
votes
0answers
26 views

Magento 1.9.2. - Dashboard: Add each month as a date range of current year in the order report

Now I have the standard Magento filters but I would like to see the reports of orders of every single month of the current year. I tried to edit function public function getChartUrl() in Graph.php, ...
0
votes
1answer
276 views

Magento 2 how to remove special price if special price date has expired

I am facing issue in Magento 2.1.7 If special price date has expired for any products , i want to remove special price and special price to date and special price from date form products, by using ...
0
votes
0answers
631 views

Special Price From Date and Special Price To Date not visible in backend M2

I am working on Magento Enterprise 2.2.5, I want to set special price for some products but Special Price From Date and Special Price To Date is not visible. Can someone have idea how we can add these ...
1
vote
0answers
206 views

Magento2: Add date-from validation for dob (date of birth) field in customer creation

I want to limit the dob field in account creation form to be not less than 01/01/1900. I thought 2 way: - limit the calendar widget (but maybe someone could input the date directly) - add a ...
0
votes
0answers
160 views

create custom date field with calendar in Magento2

I created Custom customer attribute: <div class="field"> <label for="customdate" class="label"><span><?php /* @escapeNotVerified */ echo __('Custom Date') ?></span>&...
0
votes
0answers
26 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?
0
votes
0answers
30 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="<?...
3
votes
0answers
39 views

Magento : How to Solve Fatal Error SetDateRange()

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

Saved date of birth value doesn't show up in account information

I have set up my store using Magento-1.9 and I have set the date of birth field in my store mandatory. My problem is whenever someone enters the date of birth value and saves it, it gets saved, and ...
0
votes
0answers
81 views

How to set Shipping date and Invoice date of specific order programatically

I have created a script to import order programmatically and it runs successfully but only issue is I am not able to set Invoice and shipment date as my CSV it will always save the current date in ...
0
votes
0answers
18 views

Magento2: Points balance date filter on query

I have the following query for viewing the points balance, but I want to modify it to add a date filter, example, I want to know the points balance between febraury 2016 and july 2017. SELECT ce....
0
votes
1answer
27 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,...
1
vote
3answers
1k views

Magento 2.2.3 How to adjust date format?

The following piece of code: <?= $post->getCreatedAt() ?> Returns the following output: 2018-04-13 11:53:00 How to adjust that piece of code in a way that the output would be something ...
0
votes
1answer
396 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( ...
2
votes
1answer
1k views

How do I change date picker format for admin date field

How can I change the date format to display as dd/mm/yyyy for admin date field? Currently it is displaying as mm/dd/yyyy format. Can you please help me out?
1
vote
3answers
355 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:...
1
vote
2answers
153 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 ...
0
votes
1answer
69 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
76 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
63 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 = ...
0
votes
1answer
438 views

Magento 2.1 How to change member birthday date format

By default the date format is mm/dd/yyyy when new member register. How can I change the date format of birthday field to dd/mm/yyyy? I have tried to change locale to EN_UK, EN Canada, and also ...
0
votes
1answer
35 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 ...
3
votes
1answer
955 views

Add Custom Product Grid Created Date And Created By Magento 2

In magento 2 admin panel, at product list grid area, i want to add one more grid with date, that date define product create date. so we get idea at which time product was created. And i also want to ...
1
vote
2answers
48 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::...
4
votes
1answer
2k views

Date field system.xml

I wonder what 'date' type needs in system.xml. I keep getting the error : system.xml (only the field): <field id="date" translate="label" type="date" sortOrder="2" showInDefault="1" showInWebsite=...
0
votes
1answer
74 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 = ...
1
vote
1answer
512 views

Set Product as New from Date - Reverts to random date in past after clicking out of product edit

We have an issue with using New From Date as filter in product grid Steps - on admin go to products > catalog - in columns make sure you have 'set product as new from date' selected - in filters ...
0
votes
0answers
86 views

User Choose Shipping Date, dynamically by Zip Code

I want to offer to the user the posibiliy to select the shipping DAY. Those day options would be configurable by ZIP CODE. Example: If your zip code is 1642 then you can choose "Tuesday" or "Monday" ...
0
votes
2answers
977 views

Converting a locale date to YYYY-MM-DD

I have a datepicker in my site which formats the time in the current locale. So the time gets sent to the server in d/MM/yy-format. The locale on the frontend is determined by Magento\Framework\...
0
votes
2answers
122 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
64 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 ...
3
votes
1answer
1k 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 ...
0
votes
2answers
678 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?
2
votes
0answers
337 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
390 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 ...
3
votes
3answers
2k views

Magento 2: Filter Field with Date Issue

I have below code $updatedAtFrom = date("Y-m-d",strtotime($updatedAt['orig_from'])); $updatedAtTo = date("Y-m-d",strtotime($updatedAt['orig_to'])); $this->getCollection()->addFieldToFilter('...
2
votes
0answers
254 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
3answers
1k views

Product collection based on “Set Product as New from Date”

I want product collection based on "Set Product as New from Date".I have specify date for filter this. Below is code : $todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::...
0
votes
0answers
135 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 ...