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
ascarl2ascarl2 

Converting a date to a special format

I need help trying to figure out the right formula for a date format.  I'm trying to create a custom button that will automatically map to folders on an external drive.  The problem we have with the external drive is we can only save a date in the following format: month.day.year instead of how sfdc has it: month/day/year.  So, ideally I want this field to be the close date in that format so I can create a formula that will map to the external drive. 

Any ideas?

Thanks!
werewolfwerewolf
Provided you have a date-typed field to start with, the formula snippet to generate this syntax would be:

MONTH(datefield) & '.' & DAY(datefield)  & '.' & YEAR(datefield)

If the field is actually a datetime field then you want something more like:

MONTH(DATEVALUE(datetimefield)) & '.' & DAY(DATEVALUE(datetimefield))  & '.' & YEAR(DATEVALUE(datetimefield))
ascarl2ascarl2
Thanks - got it to work!