Jump to content

_DateTimeFormat wrong output :(


Recommended Posts

Hello, My English is not good. :)

  Example

#include <Date.au3>
MsgBox(0, "", _DateTimeFormat("2017/05/02 12:47:56" , 2))

------------------------------------------------------------------------------------------------------

sshot-1.png

sshot-2.png

This date difference is very annoying. 

Why is this happening? A mistake?

Note: @AutoItVersion ;-->v3.3.14.2

Edited by luger
Link to comment
Share on other sites

5 hours ago, alien4u said:

Kisa saat and Uzun saat are different, please try to match them...

Kind Regards

I do not have a problem with the clock.(Kisa saat-Uzun saat)
Edited by luger
Link to comment
Share on other sites

  • Developers

Well you get what you ask for so AutoIt3 does exactly follow the requested formats.

The Win10 system has :  g.aa.yyyy so you only get 1 digit when the day (g) is one digit.
The Win7 system has :  gg.aa.yyyy so you always get 2 digits for day (gg), even when it's only is one digit. 

Make the format the same on both systems and you will see that AutoIt3 will provide the same output.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hi

Your problem is not your code or AutoIt. :)

The problem occurs because of a fundamental flaw inside the Windows operating system.  All dates are presented in "Regional" format, to make your life easy.  It does make any type of DATE TIME coding over time zones, or even computers on the same LAN runnign different Regional Settings,  a nightmare.  Microsoft does not support a single, universal, uniform "TODAY" macro to support date and time functions like SQL does.

You either need to get the computers to work the same way, almost always impossible if you cannot directly control those machines.

The only alternative is to use something like DTC by Melba. Link ==> https://www.autoitscript.com/forum/topic/154684-date_time_convert-bugfix-version-27-may-15/

Skysnake

 

 

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...