function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maddy123Maddy123 

TODAY() in visualforce controller

Hi,

    I am using TODAY() function to compare date.
Facing following compile time error while saving page :

Error: Compile Error: Method does not exist or incorrect signature: TODAY() at line 30 column 76

Does TODAY() function is allowed in visualpages ?

Any help will be appreciated.

Thanks.



dchasmandchasman
today() is fully support in visualforce page formulas but given the error you posted it looks like your are trying to use this function inside of apex code in your controller. You can access the current day in apex code using System.today().
Maddy123Maddy123
Thank you Doug.