Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel


Code Block
languagepy
titleCode Snippet
# This example would create a date object, and print out the quarter of that date.
 
date = system.date.getDate(2017, 3, 15) #This# This would print "Mon April 15 00:00:00 PDT 2016"
print system.date.getQuarter(date) # #ThisThis will print 2



Panel


Code Block
languagepy
titleCode Snippet
# This example can be placed on the action performed event of a button.
# It will then grab the day of the week of the calendar component,
# and enter the value returned into a numeric text field.

date = event.source.parent.getComponent('Calendar').date
event.source.parent.getComponent('Numeric Text Field').intValue = system.date.getDayOfWeek(date)


...