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
willingwilling 

Is there a getDate() like function in APEX code which gives only Date and not the Time

I am writing a trigger and I need today' date .When I use  system.today() it give me Date and  time stamp. I need only the date portion.
Please let me know if anyone knows any function that is suiatble for my requirement

papa1986papa1986

Tyr this System.now();

sandeep@Salesforcesandeep@Salesforce

System.debug('************ ' + system.today().format());
System.debug('************ ' + date.today().format());

 

Both will work like 

 

************ 07/06/2013

************ 07/06/2013