Can anybody help?
I am having problems with Date$
Using FNX Basic if I use "SHOWMESSAGE DATE$" it gives me "1/3/2013"
I have tried vb script and the date is correctly shown as "03/01/2013"
My registry settings are correct eg shortdate = "dd/MM/yyyy"
Can anybody tell me what I am doing wrong?
Could this be a bug?
Thanks!!!!
Date Format
Date Format
I would do this. Maybe the problem is resolved.
`code
Declare SetLocaleInfo As "SetLocaleInfoA" of "kernel32"
Locale As Long
LCType As Long
lpLCData As String
End Declare
Const LOCAL_DEFAULT = &H2C0A
Const LOCALE_SSHORTDATE = &H1F
dim FMT_FECHA As String
FMT_FECHA = "dd/MM/yyyy"
Object frmForm As Form
Caption="frmForm"
center
Object btnButton As Button
Tag=0
Top=10
Left=10
Caption="Button"
Hint="This is a button"
Showhint=True
OnClick=button_OnClick
End Object
Onshow=frmForm_Onshow
End Object
frmForm.Showmodal
`================================================================================
Sub frmForm_Onshow
SetLocaleInfo.Locale=LOCAL_DEFAULT
SetLocaleInfo.LCType=LOCALE_SSHORTDATE
SetLocaleInfo.lpLCData=FMT_FECHA
SetLocaleInfo.execute
End Sub
Sub button_OnClick
Showmessage Date$
End Sub
`code
Declare SetLocaleInfo As "SetLocaleInfoA" of "kernel32"
Locale As Long
LCType As Long
lpLCData As String
End Declare
Const LOCAL_DEFAULT = &H2C0A
Const LOCALE_SSHORTDATE = &H1F
dim FMT_FECHA As String
FMT_FECHA = "dd/MM/yyyy"
Object frmForm As Form
Caption="frmForm"
center
Object btnButton As Button
Tag=0
Top=10
Left=10
Caption="Button"
Hint="This is a button"
Showhint=True
OnClick=button_OnClick
End Object
Onshow=frmForm_Onshow
End Object
frmForm.Showmodal
`================================================================================
Sub frmForm_Onshow
SetLocaleInfo.Locale=LOCAL_DEFAULT
SetLocaleInfo.LCType=LOCALE_SSHORTDATE
SetLocaleInfo.lpLCData=FMT_FECHA
SetLocaleInfo.execute
End Sub
Sub button_OnClick
Showmessage Date$
End Sub