cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the folder or file modified date as timestamp from a site?

raju_gonda
Champ in-the-making
Champ in-the-making

Can Anyone Help me in this..

1 REPLY 1

abhinavmishra14
World-Class Innovator
World-Class Innovator

By default values are stored as timestamp in the DB. You need to extract the values and convert to any format you want.

Use Java backed APIs to get the cm:modified property using the nodeRefs of a folder/file. The value is of type Serializable and when you cast it to java.util.Date, you would get the timestamp automatically. 

Date modifiedDate = (Date) properties.get(ContentModel.PROP_MODIFIED);

You can parse and convert the above date to any format you want as per your requirement. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)