Graphics

 View Only
  • 1.  Formatting Time from a dataLinq source

    Posted 09-11-2019 01:42

    A simple query:

     

    My datalinq source uses 00:00:00

     

    but for hockey, in my scorebar, I only want it to be  00:00 and preferably when time is under 10 mins to show only 3 digits

    Can I modify the text object to control this?

     

    Thanks

     

    Whit



  • 2.  RE: Formatting Time from a dataLinq source

    Posted 09-12-2019 10:24

    You need to add a script to text object in order to convert the text in DateTime and then to format as you wish.
    Right click on text object > Edit Script Events > OnSetText (tab), paste this script and compile it (F7)

    Dim Time as DateTime
    Dim MyFormat as String

    Time = Convert.ToDateTime(Text)

    MyFormat = "H:mm"
    Text = Format(CDate(Time), MyFormat)

    Test it in Sequence mode.

    Link: https://www.dropbox.com/s/pojtjg2gedkoeva/Time%20Format%20H-mm.xpf?dl=0

    Have FUN!

    Gabriel


    #XPression


  • 3.  RE: Formatting Time from a dataLinq source

    Posted 09-13-2019 12:32

    Thank you Gabriel. Obviously more than one way to skin a cat. This script works perfectly.

     

    Thanks again

     

    Whit


    #XPression