SlickEdit Product Discussion > SlickEdit®

Formatting the date in alias expansion

(1/1)

parrish1:
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

jbezem:
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

parrish1:
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

Navigation

[0] Message Index

Go to full version