Jump to content

- PBXUser

- # PBXUser.Now()

  Followers 0

  Lua → VBScript SwxWare v13.10

  This function returns the current date and time of the script user.

      -- get date/time as string
      local sDateTime = PBXUser.Now()       -- in "%d.%m.%Y %H:%M:%S" format

      -- get date/time as table
      local tDateTime = PBXUser.Now("*t")   -- .sec   : number
                                            -- .min   : number
                                            -- .hour  : number
                                            -- .day   : number
                                            -- .month : number
                                            -- .year  : number
                                            -- .wday  : number
                                            -- .yday  : number
                                            -- .isdst : boolean

  This function returns a string or a table value.

  With no parameter given, this function returns the current date and time in "%d.%m.%Y %H:%M:%S" format.

  With the string parameter "*t" given, this function returns the current date and time in a table format.

  This function makes use of the Lua build-in function os.date().

  If no parameter is used, this function is identical to the GSE build-in function CurDateTime().

  By Tom Wellige

  - May 22, 2022
  Share
  Share
  Followers 0

## Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.