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 [datetime]

A DateTime object in many programming languages describes a date and a time of day. It can express either an instant in time or a position on a calendar

2
votes
0answers
27 views

Invalid input datetime format of value '1/01/1970'

i am trying to update products and all the products give me the same error and is Invalid input datetime format of value '1/01/1970' can someone help me. thanks
1
vote
1answer
29 views

how to change magento 2 date.js form file

I want to change : magento/module-ui/view/base/web/js/form/element/date.js file and set my custom date file , for this purpose I've added this line to my requirejs-config in my module : 'map': { ...
0
votes
1answer
25 views

How to show current date and time list in dropdown in magento2.1.7?

How to show current date and time list in dropdown in magento2.1.7, As I have purchased an extension for store pickup in my magento2 site.. But the date , time functionality is not working properly, ...
0
votes
0answers
20 views

Magento 2 getting issue in time interval?

I am using amasty one step checkout extension in which delivery date option available. It has delivery time range option only in admin. When I enabled this option then delivery date and time are ...
0
votes
0answers
31 views

Category Date component showing wrong value

I have created a DateTime category attribute schedule_start, I have also created a bakend model for this attribute and before saving attribute value I am formatting the date time value as per the ...
0
votes
1answer
96 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'), "...
0
votes
0answers
19 views

Magento Database Timestamp

my problem is as follows: A range of products were deleted from my PROD store (approximately 1,400). Original store approximately = 6,700 products Store after mass deletion approximately = 5,400 ...
1
vote
0answers
12 views

PHP set db value according to server datetime

Need to send notification to user by cron. For that there is a datetime picker from which admin can select datetime. IF datetime selected by datepicker is as below: $selecteddate = '26-9-2018 10:00';...
1
vote
2answers
491 views

Magento2 convert UTC time to IST

Can anyone let me know how to change UTC time from table column to IST(Indian Standard time) programatically with Datetime format? I have currently following date time value available in UTC format ...
0
votes
0answers
21 views

Magento 2 filter datetime which already pass 24 hour

I have created a custome model and this model has created_at attribute, i need to find the model collection which created_at is greater than now in 24 hour: for example : $transaction = $this->...
0
votes
1answer
291 views

How to save local date in custom datetime field

I have been doing this in Magento 1 to save my local date like this: //in my custom controller $data = $this->_filterDateTime($this->getRequest()->getPost('my_name'), array("date")); Now, ...
0
votes
1answer
63 views

Datetime Error on Newsletter Template

Steps to reproduce Go to Admin->Marketing->Newsletter Template Select Queue Newsletter from right dropdown Select a Queue Date Start and try to save it Expected Result Saved Actual result ...
0
votes
1answer
871 views

Magento 2: Filter order collection on “created_at” attribute

I want to filter order collection using 'created_at' attribute but the problem is, values stored in 'created_at' attribute is in this format 2014-03-18 06:57:11 (Combination of date and time) and I ...
0
votes
1answer
34 views

Magento 1.9.2.3

Magento is saving datetime in a wrong format. In form I'm using $dateFormatIso = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); $fieldset->addField('...
0
votes
1answer
118 views

Get store date and time in checkout

I'm creating a shipping module, and I need to get current store time and date at the time. in my requirement, I need to check if the day is Friday or not. Then after that, I need to check if time is ...
0
votes
1answer
351 views

Magento Convert timezone

I have an input array data containing time in 'Y-m-d h:i:s' format and the gmt timezone data like this: $time = array( "time" => "2017-11-01 12:00:12" "gmt" => "+7" ...
3
votes
1answer
653 views

DateTime UI Component - adjust the timezone

I created a time field by the Q&A Magento 2 - How to add the DateTime UI Component, and I also set the store TimeZone is "Asia/Shanghai". But when I click the "Go Today", it always show the time ...
3
votes
2answers
1k views

Invalid input datetime

With my magento 2.1.9 i can not save product, because I have an error: Invalid input datetime format of value '22/09/2017 I think Datepiker reverse month and day, however I have good parameters ...
0
votes
1answer
422 views

Tried to implement the datetime picker magento2, but only date is coming

I have tried to implement datetime picker in Magento2, only date is coming, datetime picker is not appearing, $eavSetup->addAttribute( \Magento\Catalog\Model\Product::ENTITY, ...
0
votes
2answers
150 views

Magento get TimeStamp not working well

I want to display a specific attribute only when the set time is not passed. Therefore I created the following code: <?php $dateFrom = Mage::app()->getLocale()->storeTimeStamp(); $dateTo = $...
0
votes
1answer
330 views

Countdown Timer is not working in magento 2.1.7?

i am use date picker in system config and get date in this format 2015-07-15 i want to convert it into this format 2015-07-15 17:29:31 because Jquery countdown is not work if i insert static value in ...
0
votes
0answers
222 views

Set custom creation timestamp or modify creation timestamp for product

Magento 2.1.1. Is there any way to set custom created_at attribute on newly created product? I used method $product->setCreatedAt($date) before saving it. Value is set on product object, but ...
4
votes
2answers
3k views

Magento 2 Create Date with Time attribute for product [duplicate]

I have tried to create datetime attribute in Magento 2. Below is my script: $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); $eavSetup->removeAttribute(\Magento\Catalog\...
6
votes
1answer
9k views

How to filter collection by date range on Magento 2?

I want to filter collection according : start date < today end date > today I try this but my getSlides() function return empty results <?php namespace Vendor\Module\Block; use Magento\...
0
votes
1answer
1k views

Database dates get stored in local timezone

I'm having trouble with a timezone issue and I'm looking for confirmation. Do dates get stored in the database in UTC. This seems to be th consensus I have found in other posts. For example: If ...
0
votes
2answers
832 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-...
6
votes
7answers
16k views

Convert datetime and timezone to datetime in Magento 2

How to convert datetime with timezone to datetime. I have tried multiple which are available on PHP blog. But nothing worked out. I am retrieving datetime from MySql query as 2017-01-20T13:59:19+03:00 ...
2
votes
1answer
637 views

Create Date Time Instance in Magento 2

How can I create Date time Instance in Magento For example 11-30-2016 5:00:00 pm. remember this should be a datetime variable and not a string variable so that I can do Datetime operations on it.
0
votes
1answer
68 views

How can I specify 0000-00-00 as Year-Month-Date while Save

I want to save a time reference in database which date part should be always 0000-00-00. I have below code with me. $entity = Mage::getModel('my_entity_reference')->load(1); $entity->...
3
votes
2answers
12k 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?
1
vote
0answers
210 views

Magento Timezone Wrong

I can't seem to work out whats going on with my Magento timezones. All my orders in the backend are processed correctly and have the correct times. The backend reports however are out by 13hrs. I've ...
0
votes
1answer
26 views

Files and Folders - all new created or changed show dates one hour after system time!

This is Magento 1.9.2.4. Here is the current situation: Server time is correctly set up. I can check it from Terminal. PHP time is correctly set up as timezone. I created a php file for showing the ...
1
vote
1answer
107 views

How can i create own order Time Countdown for EVERY ORDER

I need to create time Countdown for every order, which is used to priority to my pending order. If order complete stop the countdown. and how can I share my new order mail to multiple email addresses?...
16
votes
2answers
8k views

Magento 2 - How to add the DateTime UI Component

I want to add new field as datetime in CMS page section while adding new page, I found that magento using UI Component for it, so after digging I could able to add the date field by using below code ...
11
votes
2answers
3k views

create date and time attribute for product in magento 2

I tried to create an attribute for product which has to be display date and time calender and that should be stored in database as date and time formate only.I struggled it for a lot but no luck.Can ...
0
votes
0answers
32 views

Catalog Price Rule to the minute

I have set up a Catalog Price Rule for all products and I can set a start and end date but what about the time? Is there a way that I can add the time to the end date?
3
votes
1answer
4k views

Magento 2 backend form date time form field

How can I get datetime as form field.I have used below code able to select date but there is no time. How can I get time also as input field. $fieldset->addField( 'time', '...
0
votes
0answers
420 views

Datetime render issue on Magento admin grid

In our Magento EE dashboard sometimes DateTime column of grids (orders, customer orders) showing incorrect values, this only sometimes, not all times. Maybe it depends on the session, maybe it has the ...
0
votes
2answers
983 views

Magento 1 - Change Magento custom options date values

Hello I am simply trying to find the array of defaults for the product custom-option date my goal is to change the month from "01,02,03....12" to a string with the month name "Jan. , Feb. , Mar. - ...