You need to sign in to do that
Don't have an account?
Tom Sesselmann
How to get relativeCreatedDate from a SOQL query on FeedItem
I'm currently using the ConnectAPI getFeedElementsFromFeed which let's you access attributes such as relativeCreatedDate.
But I want to use SOQL to retreive Feed Items instead, but when I test the query in Workbench, I can't see a field for relativeCreatedDate, only CreatedDate.
Am I missing something?
But I want to use SOQL to retreive Feed Items instead, but when I test the query in Workbench, I can't see a field for relativeCreatedDate, only CreatedDate.
Am I missing something?
1 - relativeCreatedDate - Name itself says it is relative date, that means it needs some method to format the created date in Relative date, like 17 min ago, etc.
2 - Since it requires calculation, that is not store in database while creating the feed item, rather it formates the date when you call specific connect API method. Which implicitly run query on the created date and then convert it to relativeCreatedDate.
So my suggestion would be, you just calculate it on your own. Thanks.
All Answers
1 - relativeCreatedDate - Name itself says it is relative date, that means it needs some method to format the created date in Relative date, like 17 min ago, etc.
2 - Since it requires calculation, that is not store in database while creating the feed item, rather it formates the date when you call specific connect API method. Which implicitly run query on the created date and then convert it to relativeCreatedDate.
So my suggestion would be, you just calculate it on your own. Thanks.
Other way is just donwload the CSV, then write down java code to parse that CSV and calcualate diff b/n createddate and now and then convert it to as per your logics and then store them in new column.
But don't think any tool would be there to do it except of Excel. Thanks.