Compare today's date to the end of the current year

poppinspoppins Member Posts: 647
Hi everyone,

I want to compare the current date (TODAY) to the end of the year date...
How to do that???

Answers

  • ppavukppavuk Member Posts: 334
    DateFormulas is a answer. Build end of year date using dateformulas, and compare. Or use system table 'Date', which hold all dates, filter on it, find last day of year and compare. You can even use dmy2date and date2dmy functions to build endofyear date - and compare then.
  • MBergerMBerger Member Posts: 413
    EndOfCurrentYear := DMY2Date(31,12,Date2DMY(today,3)) ;
    
  • poppinspoppins Member Posts: 647
    edited 2012-11-29
    I've got it :)
    For example, if I want to check if the two dates are different:
    IF TODAY <> CALCDATE('<CY>',TODAY) THEN
    //Further Instructions
    

    The answer of MBerger works too :)
Sign In or Register to comment.