Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Text variable: metadata caption creation date in long date format

New Here ,
Jan 03, 2023 Jan 03, 2023

Hello community,

Since I last used text variable > metadata caption > creation date, the format has changed from long date to short. As has previously been discussed in this thread: https://community.adobe.com/t5/indesign-discussions/changing-date-format-in-captions/m-p/10283183#M1...  the date format is determined by the Mac OS system settings. Unfortunately, Apple have removed the advanced date format options from system settings (presumably in the Ventura update), and I can no longer select a long date format.

What was:

Screenshot 2023-01-04 at 2.22.17 pm.png

Is now:

Screenshot 2023-01-04 at 2.10.37 pm.png

 

I tried changing my .plist preferences file, as per this article:

https://www.caseyliss.com/2022/11/14/ventura-date-formats

...but just screwed things up further.

 

Any suggestions? My only other thought was to convert all live captions to plain text and then run a script to convert short date format to long (but then the captions won't update if I make changes, which isn't ideal).

 

Feature request — add date format to metadata captions, like we have available on the "Creation Date" variable.

TOPICS
Feature request , Scripting , Type
432
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 05, 2023 Jan 05, 2023

Hi @Lauren_mint,

Feature requests are better submitted at the following link

https://indesign.uservoice.com

These are peer to peer forums with minimal visits from Adobe employees. However, the link I gave is the place Adobe engineering montiors so if you post a request which garners good support via upvotes there is a better chance of it catching the attention of Adobe project managers.

After making the post, share its URL here as well so that someone in need of a similiar solution can upvote it.

-Manan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 06, 2023 Jan 06, 2023

You could write something in Photoshop or Bridge that changes the creation date meta info to the format you want. Could even do it theoretically in InDesign using BridgeTalk. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 13, 2023 Jan 13, 2023
LATEST

I tried to change the metadata information only in InDesign using ExtendScript.
The DateCreated information is formatted and written to Headline.

#target "indesign"
if(!Window.confirm("""Change the metadata of the linked image.
Write DateCreated information in Headline by changing the month to English notation.
DateCreated:  2023-01-01 > Headline:  1 January 2023""")){ exit(); }
if (ExternalObject.AdobeXMPScript == undefined) {
    ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
}
for (var i = 0; app.activeDocument.links.count() > i; i++) {
    if (!app.activeDocument.links.item(i).parent instanceof Image) { continue; }
    if (app.activeDocument.links.item(i).status == LinkStatus.LINK_MISSING) { continue; }
    var myXmpFile = new XMPFile(app.activeDocument.links.item(i).filePath, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
    var myXmp = myXmpFile.getXMP();
    { // Get DateCreated namespace
        var myXmpIterator = myXmp.iterator();
        var myXMPProperty = myXmpIterator.next();
        var myHeadlineNameSpace = undefined;
        while (myXMPProperty) {
            if ((/:DateCreated/).test(myXMPProperty.path)) {
                myHeadlineNameSpace = myXMPProperty.namespace;
                break;
            }
            myXMPProperty = myXmpIterator.next();
        }
    }
    if (myHeadlineNameSpace != undefined) {
        { // Get and format DateCreated
            if ((/^\d{4}\-\d{2}-\d{2}/).test(myXmp.getProperty(myHeadlineNameSpace, "DateCreated").toString())) {
                var myMatchValue = myXmp.getProperty(myHeadlineNameSpace, "DateCreated").toString().match(/\d+/g);
                var myCreateDate = myMatchValue[2].match(/[1-3]\d|(?<=0)\d/) + " ";
                switch (myMatchValue[1]) {
                    case '01':
                        myCreateDate += "January";
                        break;
                    case '02':
                        myCreateDate += "February";
                        break;
                    case '03':
                        myCreateDate += "March";
                        break;
                    case '04':
                        myCreateDate += "April";
                        break;
                    case '05':
                        myCreateDate += "May";
                        break;
                    case '06':
                        myCreateDate += "June";
                        break;
                    case '07':
                        myCreateDate += "July";
                        break;
                    case '08':
                        myCreateDate += "August";
                        break;
                    case '09':
                        myCreateDate += "September";
                        break;
                    case '10':
                        myCreateDate += "October";
                        break;
                    case '11':
                        myCreateDate += "November";
                        break;
                    case '12':
                        myCreateDate += "December";
                        break;
                }
                myCreateDate += " " + myMatchValue[0];
            }
        }
        myXmp.setProperty(myHeadlineNameSpace, "Headline", myCreateDate);
        if (myXmpFile.canPutXMP(myXmp)) { myXmpFile.putXMP(myXmp); }  // Write updated metadata into the file
    }
    myXmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
}

 

 

 

Is it possible to write simple character information to CreateDate?
It seems to accept only XMPDateTime object.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines