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
miku105miku105 

how to provide default name with current date while saving pdf.???

how to provide default name with current date while saving pdf.I have render as pdf in my VF page.

 

I want current date in yyyymmdd

The format is something like this.

docs_yyyymmdd.csv

@anilbathula@@anilbathula@

Hi miku105,

 

Use this code :-

Datetime dt=system.today();

string dtfrmt=dt.format('yyyy mm dd');

 

just return dtfrmt like this:

docs__dtfrmt.csv

 

Thanks

Anil.B