0

I have a windows server running an Application (Metastorm) written in VB Script that prints out a log file in american date format. I want it to be in U.K format (DD/MM/YYYY).

I don't want to format the date in the script, I want to know what is causing this. It isn't just logging that is an issue, this is causing us many other issues behind the scenes.

I am certain it uses the server settings to get the date/time, but the server settings show U.K Format

Script that writes Log File (Pretty standard, works on all other servers)

 ...
 ework.WriteText now() & " - " & cStr(p_Data),OutputLogPath & thisFileName

Log File (written on the 13th April 2017)

4/13/2017 3:32:38 PM - ******** End ValidateForm ********
4/13/2017 3:32:38 PM - thislineTotalExVat = 50
4/13/2017 3:32:38 PM - thisTaxRate = 20
4/13/2017 3:32:38 PM - thisLineTotal = 60
4/13/2017 3:32:38 PM - eworknumDiscountPercentage = 0

Printing out the current datetime through VB Script is showing as American Format.

I've changed all I can find in the windows server settings:

enter image description here

enter image description here

enter image description here

rednaxela
  • 661
  • 2
  • 9
  • 21
  • What do you mean by UK format? you mean include pm and am or you mean have day before month or you mean UK timezone – Mederic May 09 '17 at 08:50
  • Is this vb.net or vbScript? Tag your question correctly – Pikoh May 09 '17 at 08:51
  • Possible duplicate of [VBScript How can I Format Date?](http://stackoverflow.com/questions/9003923/vbscript-how-can-i-format-date) – Pikoh May 09 '17 at 08:54
  • @Pikoh No I don't want to format the date, I want to know what is happening behind the scenes here. – rednaxela May 09 '17 at 09:44
  • Well,use [`GetLocale`](https://msdn.microsoft.com/en-us/library/d457t70w(v=vs.84).aspx) to see what locale is it getting – Pikoh May 09 '17 at 09:48
  • Anyway, i would never trust system settings for handling dates if the format might be a problem. Format it to your needs or at least set the locale – Pikoh May 09 '17 at 09:53
  • @rednaxela I know this is an old question but have you set your date format in `eUserOptions.js` (located in C:\Program Files\Metastorm BPM\Web\ie\jscripts on the server)? – Syntax Error Feb 21 '18 at 08:29

0 Answers0