Action

Insert Creation Date and Time

Posted by Martin Schuhmann, Last update about 17 hours ago

Insert Creation Date and Time

Insert the creation date and time into the second line of a draft.

Steps

  • script

    // Insert Creation Date and Time
    // Created by Martin Schuhmann
    // Insert the creation date and time into the second line of a draft
    
    // Use a template to create new content
    let newContent = draft.processTemplate(`[[title]]
    [[created|%d %b %Y %H:%M:%S]]
    
    [[body]]`)
    
    // Update the draft
    draft.content = newContent
    draft.update()

Options

  • After Success Nothing
    Notification None
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.