GetDate() bug un Amiga
- Juan Carlos
- Posts: 932
- Joined: Mon Sep 06, 2010 1:02 pm
GetDate() bug un Amiga
The instrucción date$ = GetDate([type]) has a strange way of work, in Windows the correct when you pass the date$=GetDate() in Windows you get day/month number string/year full with four number example 02/03/2020 but this instruction under Amiga 68k and MorphOS you get 02/mar/20 the month in letters and the year only two numbers, even if you added the parameter #DATELOCALNATIVE under Windows works fine but under Amiga works like #DATELOCAL.
- airsoftsoftwair
- Posts: 5834
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: GetDate() bug un Amiga
Not a bug. #DATELOCALNATIVE is the default and delivers the date in the operating system's default format. If you want it locale-independent, use #DATELOCAL instead.
- Juan Carlos
- Posts: 932
- Joined: Mon Sep 06, 2010 1:02 pm
Re: GetDate() bug un Amiga
No, in Amiga systems both parameters hace the same results in Windows you have the two results as you say in the guide and manual.
I want in Amiga get the date with 03/03/2020 like Windows not only 03-Mar-2020 with both parameters.
I want in Amiga get the date with 03/03/2020 like Windows not only 03-Mar-2020 with both parameters.
- airsoftsoftwair
- Posts: 5834
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: GetDate() bug un Amiga
There is no way to get 03/03/2020 on Amiga, it is locale-dependent. On Windows it will be different too, e.g. on a German system you get 03.03.2020 for #DATELOCALNATIVE. The only way to have a locale-independent implementation is to use #DATELOCAL. If you don't like the format returned by #DATELOCAL, use ParseDate() to convert it to a different format. It's really easy to convert #DATELOCAL's result to dd/mm/yyyy...Juan Carlos wrote: ↑Tue Mar 03, 2020 10:55 am No, in Amiga systems both parameters hace the same results in Windows you have the two results as you say in the guide and manual.
I want in Amiga get the date with 03/03/2020 like Windows not only 03-Mar-2020 with both parameters.
- Juan Carlos
- Posts: 932
- Joined: Mon Sep 06, 2010 1:02 pm
Re: GetDate() bug un Amiga
Thanks for the answer is that manual isn't clear this issue.
- Juan Carlos
- Posts: 932
- Joined: Mon Sep 06, 2010 1:02 pm
Re: GetDate() bug un Amiga
For example like GetDate() doesn't work correcto os impossible to use the CompareDates() because It gives error to comparativo. 
- airsoftsoftwair
- Posts: 5834
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: GetDate() bug un Amiga
Well, of course CompareDates() can only be used with dates in the format as returned by #DATELOCAL.