How to set Timestamp in Comments

Hi, the comments show only the number of days/months ago when was posted. We need to know the timestamp, is there a way of changing this setting?


1 Like

You can add hook before_insert event on doctype comment.

and add python code to save current time in comment.

import datetime"%Y-%m-%d %H:%M:%S")

Thank you for your answer.

But comments are not DocTypes, themselves they can be attached to any DocType.

@info comments are separate doctype,
If you are using v6, then comments are stored in Communication DocType, for Older version comments stored in Comments DocType.