Jump to content
  • CurHour()

    CurHour()

    VBScript   → Lua

     

    The function returns the current hour (01-24) according to the script user's location.

     

    Dim sHour
    sHour = CurHour()

     

    or if being used directly within a GSE property dialog, e.g. in a Say Number block to directly announce the current hour to the caller:

     

    image.png

     

     

    This function returns a two digit string value.

     

    This function can be called at any time within the call routing script.

     

    The current time will be requested making use of the Server Script API function PBXUser.Now. This ensures that the location configuration (time zone) of the script user will be considered.

     

     

    The CurHour() function can be used for a neat little example:

     

    Lets assume you want to greet every caller with a nice welcome announcement. But this should not be one static annoucement, but a little bit more dynamic:

     

    • in the morning it includes "Good morning, and welcome to..." 
    • over the day it includes "Good day, and welcome to..."
    • in the evening it includes "Good evening, and welcome to..."


    You can use the Choose Announcement block, to setup all three announcement and use the CurHour() function to differentiate between them:

     

    image.png

     

     


    Tom Wellige
     Share


     Share




×
×
  • Create New...

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.