Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to write timestamp?

  1. #1
    New member
    Join Date
    Jan 2016
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to write timestamp?

    How to write updated at timestamp in database?

    If you change account information...
    1. Login to the website frontend in a customer account.
    Click on "Account information" and edit some information (firstname, lastname, ...).
    Click on the save button.
    Now login to the magento backend and click on customers -> manage customers.
    Now you see the grid with the correct "updated_at" timestamp.

    If you change your adressbook information...
    2. Login to the website frontend again.
    Click on "Account information"
    And now click on "Addressbook" and edit some information.
    Click on the save button.
    Now go to the magento backend and click on customers -> manage customers. Updated_at is not changed.
    How can we set new updated_at timestamp for the address book also?


    Address is its own table and has its own updated_at field.
    If i want to see the timestamp of customer updated when address is updated, i have to an observer for customer_save_after update the timestamp of customer there?
    Can you tell me how we can setup an observer for customer_save_after update for the timestamp?
    In which file i have to add the code?

    Thank you and best wishes from germany

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    Canada
    Posts
    873
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Right-click on the cell and select 'Format cells'.
    In the Format Cells dialog box, select 'Custom' category in the Number tab.
    In the Type field, enter dd-mm-yyyy hh:mm:ss.
    Click OK.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •