3 Replies Latest reply on Oct 9, 2007 5:26 PM by Lukewig

    System date


      Having trouble with this. I want a blank field/text box to display the current system date in mm/dd/yy format when the playback head
      enters a frame. Does anyone know how I can do this? Thank you.

        • 1. System date
          Applied CD
          _system.date() will return the current system date but not necessarily in the format you’ve requested. The format is determined by the user’s preference selected in the time/date control panel (which can make parsing the date tricky)

          Look into Buddy API’s baSystemTime(format) where you can easily format the current time and date any way you like. To get the format you requested:
          todaysDate = baSystemTime(“%0m/%0d/%y”) (note that the format string is case sensitive)

          If you need a date object to perform calendar math, just try this:
          myDateObject = date(baSystemTime(“date”))
          • 2. Re: System date
            Chris-Kot Level 1
            • 3. Re: System date

              You can use built in date objects eg

              d = the systemDate
              str = d.month & "/" & d.day & "/" & d.year

              If you're familiar with PHP's formatting of dates, you can use this script ( http://www.lingoworkshop.com/Codelib/xlib.php -- look for 'datelib') to format a date. For example

              d = the systemDate
              str = GetDateStr("jS of F Y", d)

              -- Luke