2

In U2/Universe/Pick, there is a function ICONV("11/11/15","D") to convert an external date to an internal date but this will work in USA or with the date format mm/dd/yyyy only. How can I use this function for UK date format (dd/mm/yyyy) ?

2 Answers2

4
ICONV("11/12/15","D4/DMY")
output: 17512

According to the UniVerse BASIC Commands Reference documentation, you can also use the following to control the date format:

You can set the default date format with the DATE.FORMAT command. A system-wide default date format can be set in the msg.text file of the UV account directory. Date conversions specified in file dictionaries or in the ICONV function or the OCONV function use the default date format except where they specifically override it. When NLS locales are enabled, the locale overrides any value set in the msg.text file.

webthaumaturge
  • 1,198
  • 1
  • 11
  • 23
1

NLS sets the local date format required so if it is enabled the following does not apply.

The question is, do you want all dates in dd/mm/yyyy format or just for this process. Assuming all dates should be, then setting DATE.FORMAT ON at login will do this. Otherwise you can set it temporarily just for the process and afterwards set it back using DATE.FORMAT OFF.