Stack Exchange Network

Stack Exchange network consists of 174 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]

The tag has no usage guidance.

0
votes
0answers
10 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
41 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
21 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
28 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
12 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
12 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
90 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
120 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
131 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
11 views

date from product page is in the cart minus one day

Datepicker is inserted in the main info product page, so far all good, when clicking on add to cart the date is not taken as it is shown on the product page, it is minus one day. What can I do? Tried ...
0
votes
0answers
77 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
23 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
23 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
36 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
36 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
56 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
16 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
26 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
592 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
0answers
33 views

Magento 2 : Display All Months in Month Dropdown With no Respect of Year

I want to display all months in month dropdown with no respect of year i.e., user can select any month from the dropdwon and date in magento 2.1.
0
votes
1answer
123 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( ...
0
votes
0answers
13 views

If I put the date on Magento webstore frontend, the backend is not capturing date correctly. DOB is added as 1/1/1979. by default

If I put the date(DOB) on Magento webstore frontend, the backend is not capturing date correctly. DOB is added as 1/1/1979. by default
0
votes
0answers
122 views

Coupon code: expiration date

Is there a way to modify the expiration date of a single coupon and not only for all the coupons of the promo rule? I mean...daily, I need to send emails (with Oracle Responsys) with a coupon (...
2
votes
1answer
749 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
233 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
91 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
47 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, ...
0
votes
0answers
16 views

magento 1.9.3 admin customer joining date swapping between day and month

when am saving the joining date of the customer as 4-may-2018 .It is saving this date as 5-April-2018
1
vote
1answer
71 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
52 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
0answers
92 views

Year when saving dates is wrong In Magento 2

I have the following issue: When i tried to save a date (From and To)for example in Cart Price Rule, or "special price From" and "special price to" for a prodcut, no metter what year i insert in the ...
0
votes
1answer
354 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
32 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 ...
2
votes
1answer
689 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
44 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::...
5
votes
1answer
1k 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
66 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
376 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
68 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
797 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
66 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
53 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
575 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
314 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 ...
0
votes
0answers
37 views

How can I change gmt in magento RFC 2822 formated date?

I want to add some other value to gmt in date. Example: I have date: $date = date("r", time()); That print: Thu, 04 May 2017 11:39:25 +0000 and I want to get date like Thu, 04 May 2017 11:39:25 +...
2
votes
1answer
340 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 ...
2
votes
2answers
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
138 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::...