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
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. ...
5
votes
2answers
6k views

Customer created_at Date off by months

I'm working on syncing my customers with a third party application and have discovered that many of my created_at dates are way off. Today is 2014-04-08 yet I have several records with a created_at ...
1
vote
0answers
432 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
318 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 ...
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
586 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
948 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 ...
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::...
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
765 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&...
5
votes
0answers
927 views

CE 1.9.2 - Date of Birth validation at checkout not working [closed]

I cannot for the life of me understand what is happening with the Date of Birth field in Checkout or Registration. I've set it as Required under Customer Configuration, and have the date fields order ...
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('...
1
vote
2answers
981 views

Customer registration month and day get swapped when day is between 1-12

I have looked for answers to this issue and found this one. Unfortunately it is incomplete as in the "Manage Customers" table the date is still swapped. The solution provided in that answer fixes only ...
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
739 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 ...
0
votes
2answers
757 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 ...
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 ...
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.
3
votes
6answers
17k views

Change date format

I use a plugin that shows me list of posts and I want to change format of date. This is show me date like this: 24 january 2015 12:20:11 and this is the code of above output: <?php echo $post->...
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
2answers
665 views

Coupons applying outside of date range and active state

I have some shopping cart price rules set up and want to limit the date range. I have set up my rule to apply a 15% discount on a given SKU, this is working. I have a date range setup from a week ...
0
votes
1answer
31 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, ...
2
votes
0answers
259 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?
1
vote
0answers
95 views

NEW PRODUCT updating at the wrong time

One of my clients are having trouble with their magento installation. When they they create a new product and set the "Set Product as New from Date". It does not update until later that day, and not ...
2
votes
1answer
380 views

catalog/product_new no longer displays anything

So, I've been using this as a New Arrivals part of my home page to display those products that have the most recent 'Set Product as New From Date' and 'Set Product as New To Date' parameters set up. I'...
8
votes
1answer
5k views

How to add a date field in system.xml?

How can I create a date field by using system.xml?
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
644 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'), ...
0
votes
0answers
970 views

Custom design - issue with date (Please enter a valid date.)

When I try to change a date for custom design, I receive the following error message. "Please enter a valid date.". I'm enclosing the image. I'm using 1.9.2 version of Magento. any suggestions?
1
vote
1answer
59 views

Magento hide date when value is 2010-01-01 00:00:00

I use a custom date attribute to display a date. By default the attribute does have value 2010-01-01 or does not have any value (empty attribute). I need are rule that checks if the date is the ...
0
votes
1answer
2k views

Set date value to an attribute in a custom model

So I have my EAV called mymodel and one of it's fields/attributes is called "enddate" of date type. Now, when I create a new object, and I want to set the value of this "enddate"... I just can't. The ...
2
votes
1answer
88 views

Sort orders by criterias

I'm trying to display a history of customer's orders by products. I succeeded to display every product ordered with its date, name, price, sku and quantity. But now I'd like to display it by at least ...
0
votes
1answer
142 views

sales_flat_shipment, created_at is stored with difference of 4 hours

I have this problem when I ship my order. the date field created_at is stored with difference of 4 hours. it's the same problem with sales_flat_shipment_track. ex: I shipped today at 11:56AM, but in ...
1
vote
1answer
396 views

Control Attribute with a date Attribute

OK, this is a little confusing to explain. What I need is to show an attribute only within a certain time/date frame. I have a custom attribute which shows text and after a certain date, I want it ...
1
vote
0answers
4k views

Change Magento Calendar date format

How to change in Magento date format for Calendar from mm / dd / yyyy to dd / mm / yyyy ? I have tried change locale, nothing. Also for Calendar.setup change setup setting ifFormat: "%Y-%m-%d", ...
2
votes
1answer
1k views

Promotions/Catalog Price Rules - Applying product's price rule only for 2 days [duplicate]

I am facing a problem with my Magento (ver. 1.8.0.0) and Catalog price rules. I have placed a Catalogue Rule in Promotions/Catalog Price Rules. The Rule is 15% discount of a Customer Group in a ...
1
vote
0answers
669 views

Magento 1.9 Wrong customer created and last login dates [duplicate]

I am running Magento v.1.9.0.1 and I am facing a problem with the dates displayed when editing a customer via the admin area. For example, Last Logged In: 11 Feb 7791 4:23:48 μ.μ. Last Logged In (...
1
vote
1answer
874 views

comparing time of day [closed]

what is the best way to compare the date? for example i'd like to compare the hour of the day and if the time of day is a certain number execute a certain path. How best to do this?
1
vote
1answer
2k views

Translate month in 'Get date'

I have a news page in my magento store which is displaying news posts with a publish date, my store is built in 2 languages, the code which is creating the format: public function getPublishDate($...
5
votes
1answer
5k views

Admin form save date format, month and day wrong way around

I have created a new custom form/grid with a date field, I've also set up a table with the 'date' field to match. $this->addColumn('date', array( 'header' => Mage::helper('...
0
votes
1answer
3k views

Magento Calender with onSelect event

I am trying to capture magento's calender date-select event, haven't found anything about any where, but I already know magento is using jQuery UI calender so I looked into jQuery UI documentation and ...
2
votes
0answers
219 views

Customer created_at date is converted to UTC twice [closed]

I've found a problem with an extension we installed for registering new customers via social networks. Every customer that registers through the extension gets the wrong created_at date. We have our ...
0
votes
1answer
78 views

Model _beforeSave observer can't save time

Synopsis I have a date field in my admin form but when I save this date & time, I then have an observer that runs on my model _beforeSave which corrects the format for MySQL. Although in the ...
1
vote
1answer
782 views

find in which date product is uploaded in admin panel

we uploaded lot of products to magento site we want to know in which date or month we uploaded the product. is there any way we can get the information about product uploaded date. thanks in ...
0
votes
1answer
181 views

Date formats interpreting “european” date format DDMMYY for “American” format MMDDYY

Could some one please let me know the reason of this happpening that sometimes European date format is being taken in the customer database instead of American. We have selected the time zone as PST ...
1
vote
2answers
669 views

Check if date is some day of the year

We use some line to display if we are open or not. For this we use this line: <?php $weekday = Mage::getSingleton('core/date')->date('w'); ?> <?php $hour = Mage::getSingleton('core/...
6
votes
2answers
2k views

Customer created / logged in timestamps in Admin

Over the weekend (2014-10-04 midnight through 2014-10-06 noon) I noticed that the customer created and last logged in dates were incorrect in the Admin. Last Logged In: Oct 6, 8295 10:12:43 AM (...
2
votes
1answer
604 views

Format custom date order field

I have created a custom field when submitting an order called: Delivery Date. I want to display this in my transactional e-mail that is being sent after placing the order. When i code it like this: ...