Pregunta

If I want to change the current date format to 20, for example, I can use the command

OptionsViewEx DateFormat:=20

but how can I get the current date format (or any other view option for that matter)?

¿Fue útil?

Solución

DefaultDateFormat should be the function to use.

oldvalue = Application.DefaultDateFormat
Application.DefaultDateFormat = 20 ' or = pjDate_mm_dd_yyyy

This gets or sets the default date format. (technet)

This gives the complete list of format types.

Otros consejos

If you use Date function get a date in current format, but if you need change use format(Date,"yyyy-mmmm-dd") for example.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top