+ 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