SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: parrish1 on July 13, 2006, 04:39:04 pm

Title: Formatting the date in alias expansion
Post by: parrish1 on July 13, 2006, 04:39:04 pm
Hello,

I have inserted a date in an alias expansion using %\d
Is there a way to alter/choose the format of the date that is inserted?
I would really like to have YYYYMMDD instead of MM/DD/YYYY

Thanks
Tim
Title: Re: Formatting the date in alias expansion
Post by: jbezem on July 14, 2006, 05:54:26 am
According to the source code (alias.e, expand_alias_line()), the builtin function _date is used with the option 'L' (locale dependent date format).
If you are on Windows, this should be easily changed by changing your date settings for Windows itself (short date settings) to the desired format. If not on Windows, some extra tweaking will be necessary.

HTH,

Johan
Title: Re: Formatting the date in alias expansion
Post by: parrish1 on July 14, 2006, 03:18:15 pm
Johan,

Changing the date settings for Windows does alter the result from alias expansion, thanks.
However, I don't really want that format for everything on my system.  :(
I would prefer the ability to specify the format I want within the alias definition.
Sounds like this is becoming a feature request  :)

Thanks again for your suggestion...now that you have pointed me to alias.e, I will see if I can tweak it myself to get the format I want. :)

Tim