cancel
Showing results for 
Search instead for 
Did you mean: 

Importing system attribute "created_at" with a timestamp

SOLVED

Importing system attribute "created_at" with a timestamp

Hello, i am currently migrating from an old osCommerce 2.2ms to Magento 2.3.4 shop.

Therefore i am importing all old products with a certain timestamp into magento.

So my question is about the system attribute "created_at":

 

I am importing the attribute created_at in this formatting e.g. "2016-07-03 05:36:04":

I use an Improved Import Export extension for the import.

 

The magento-documentation about the attribute created_at:

created_at - Indicates the date when the product was created. The date is automatically generated when the product is created, but can be edited later.

https://docs.magento.com/m2/ce/user_guide/system/data-attributes-product.html

 

I would have two questions about the attribute:

1) I am wondering, where this value can be edited? I can not find a way to edit the value. (Doc says, it can be edited: "but can be edited later.")

2) My Import does not seem to recognise the imported created_at values. Where can i veryfy that the timestamp has been stored while importing (can't find it in the database).

 

Thank you for your help.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Importing system attribute "created_at" with a timestamp

Hi @A500 

 

You can found database table catalog_product_entity.

It has created_at column.

Screenshot from 2020-03-27 10-28-08.png

I hope it will help you!

View solution in original post

6 REPLIES 6

Re: Importing system attribute "created_at" with a timestamp

Hi @A500 

 

You can found database table catalog_product_entity.

It has created_at column.

Screenshot from 2020-03-27 10-28-08.png

I hope it will help you!

Re: Importing system attribute "created_at" with a timestamp

Hello Vimal, thank you for that perfect hint.

This table shows exactly what i was looking for and i was able to determine the dates.

 

Unfortunately the fields (created_at and updated_at) are not being recognised while importing. The import ignores only those both fields.

Re: Importing system attribute "created_at" with a timestamp

Hi @A500 

Yes, because both field are timestamp. Updated_at updated with current time.

You can update them using custom Mysql query as well.

Please accept as a solution if works for you, so it can help to others as well.

I hope it will help you!

Re: Importing system attribute "created_at" with a timestamp

Thank you Vimal, i will have to import 10k timestamps.

Do you maybe know a simple script that does that with a csv file? I thought the import/export extension would prevent me from doing that.

 

Re: Importing system attribute "created_at" with a timestamp

Hi @A500 

One more thing, I want to add.. make sure that you are using correct date format in csv file while importing. It should be imported. To make sure date format you can export csv file for products using magento admin panel.
https://docs.magento.com/m2/ce/user_guide/system/data-import.html

You can update using csv file and custom script as well.

You can create a new csv, contains column sku, created_at with data.

You can read csv file using custom php custom script.
https://phpenthusiast.com/blog/parse-csv-with-php

Then loop you can update created_at date in the database table based on custom mysql query.

I hope it will help you!

Re: Importing system attribute "created_at" with a timestamp

Will there any impact if we are updating table 'catalog_product_entity' for changing the create_at ?