Wednesday, July 2, 2014

Formatting datetime datafields in CoolSign Content Creator

 
When using the current datetime or Data table datetime values for digital signage content in Haivision's CoolSigns Content Creator software, the following DateTime string patterns can be used:
 
MM/dd/yyyy - 08/22/2014 
dddd, MMMM dd yyyy - Tuesday, July 01 2014 
dddd, MMMM d yyyy HH:mm - Tuesday, July 1 2014 06:30 
dddd, MMMM dd yyyy hh:mm tt - Tuesday, July 01 2014 06:30 AM 
dddd, MMMM d yyyy H:mm - Tuesday, July 1 2014 6:30 
dddd, MMMM dd yyyy h:mm tt - Tuesday, July 01 2014 6:30 AM
ddd, MMM d yyyy h:mm tt - Tues, Jul 1 2014 6:30 AM
dddd, MMMM d yyyy HH:mm:ss - Tuesday, July 1 2014 06:30:07 
MM/dd/yyyy HH:mm - 08/22/2014 06:30 
MM/dd/yyyy hh:mm tt - 08/22/2014 06:30 AM 
MM/dd/yyyy H:mm - 08/22/2014 6:30 
MM/dd/yyyy h:mm tt - 08/22/2014 6:30 AM  
MM/dd/yyyy HH:mm:ss - 08/22/2014 06:30:07


In the Expression builder, the following javascript syntax can be used to format the datetime value:

return FormatDateStr(GetValueEx("localstart",rowindex,timeoffset,""),"h:mm tt")

If - Else statement in CoolSigns Datafield Expression

When using Data tables to add dynamic data to digital signage content in Haivision's CoolSign Content Creator software, it's important to know that the Expression builder editor excepts most javascript syntax. If - Else statements are permitted, below is an example:

if (GetValueEx("location",rowindex,timeoffset,"").indexOf("Away") > -1)
      return "Away Game"
else
      return "Home Game"

This example checks the value of "location" and assigns a value to the datafield based on that value.