Return metadata cdbDatCreated - Printable Version +- LiveCloud Forums (https://forums.livecloud.io) +-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1) +--- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=3) +--- Thread: Return metadata cdbDatCreated (/showthread.php?tid=237) |
Return metadata cdbDatCreated - JereMiami - 11-24-2019 I would like to return the value in the cdbDateCreated metadata (e.g., "Sun, Oct. 27, 2019 4:06:00 PM"). I know that it is a subkey. How would I do this? Thanks! RE: Return metadata cdbDatCreated - simon.schvartzman - 11-25-2019 (11-24-2019, 12:49 PM)JereMiami Wrote: I would like to return the value in the cdbDateCreated metadata (e.g., "Sun, Oct. 27, 2019 4:06:00 PM"). I know that it is a subkey. How would I do this? Hi, AFAIK there is no way to do it. I have a similar need and submitted a suggestion that can be seen here https://forums.livecloud.io/showthread.php?tid=203&highlight=metada RE: Return metadata cdbDatCreated - efrain.c - 11-25-2019 Hi JereMiami, Assuming you have the recordID of the record in tRecordID and the table name in tTableName you can do the following: Code: put cdb_read(tTableName, tRecordID, "cloud") into tOutputA tDateCreated will contain the value you want RE: Return metadata cdbDatCreated - mark_talluto - 11-25-2019 One thing to keep in mind is that the timing metadata is stored in seconds. Thus, you will need to convert it into a format that is more human-friendly. As an example: Code: convert tDateCreated to internet date Output would be: Mon, 25 Nov 2019 10:26:59 -0800 Look up 'convert' in the LiveCode dictionary for other time formats. RE: Return metadata cdbDatCreated - mark_talluto - 11-25-2019 (11-25-2019, 04:57 PM)simon.schvartzman Wrote:(11-24-2019, 12:49 PM)JereMiami Wrote: I would like to return the value in the cdbDateCreated metadata (e.g., "Sun, Oct. 27, 2019 4:06:00 PM"). I know that it is a subkey. How would I do this? The export API for JSON is able to provide the metadata. But, there are other ways to get to your data. As Efrain proposes, your cdb_read will download the entire record, including the metadata. The query API has an option to provide the whole record as output as well. Keep in mind that the times are stored in seconds for a variety of positive reasons; they take up less space, can be sorted numerically, and are easier to compare times against each other. RE: Return metadata cdbDatCreated - JereMiami - 12-05-2019 (11-25-2019, 05:40 PM)efrain.c Wrote: Hi JereMiami, Thanks! I also was able to retrieve the date created metadata and convert it into a date and time format using: put cdb_lookUpValue(table, tLine, "cdb", "cloud") into tTempHolder combine tTempHolder using return put line 2 of tTempHolderinto tHolder |