Need Help with SYSTEM.GETDate

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • clientele
    Forum Member
    • Dec 2004
    • 75

    Need Help with SYSTEM.GETDate

    Below is what im working with, but I need the date to make "image22" visable from 04/14/2005 to 12/31/2005. Any help would be welcome thanks in advance.

    if System.GetDate(DATE_FMT_US) == "04/14/2005" then
    Label.SetVisible("Image22", true);
  • Worm
    Indigo Rose Customer
    • Jul 2002
    • 3967

    #2
    Easiest way is to use DATE_FMT_ISO, strip the "-" out of the date, then compare the numbers.

    Code:
    nToday = String.ToNumber(String.Replace(System.GetDate(DATE_FMT_ISO), "-",""))
    -- 04/14/2005  =  20050414
    -- 12/31/2005  =  20051231
    
    if nToday >= 20050414 and nToday <= 20051231 then
    	Image.SetVisible("Image22", true)
    else
    	Image.SetVisible("Image22", false)
    end

    Comment

    • clientele
      Forum Member
      • Dec 2004
      • 75

      #3
      Thank you , thank you! It works perfect.

      Comment

      Working...
      X