hai
I have one text box in asp page
it for date entry field(dd/mm/yyyy)format user entered.
But when i store in database it will store (mm/dd/yyyy) format
how to change in asp.
I use the follwing declaration in visual basic form and put a command button then write the follwoing sql code (may it help).
Option Explicit
Private Const LOCALE_SSHORTDATE = &H1F
Private Const WM_SETTINGCHANGE = &H1A
'same as the old WM_WININICHANGE
Private Const HWND_BROADCAST = &HFFFF&
Private Declare Function SetLocaleInfo Lib "kernel32" Alias _
"SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As _
Long, ByVal lpLCData As String) As Boolean
Private Declare Function PostMessage Lib "user32" Alias _
"PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function GetSystemDefaultLCID Lib "kernel32" _
() As Long
Private Sub Command1_Click()
Dim dwLCID As Long
dwLCID = GetSystemDefaultLCID()
If SetLocaleInfo(dwLCID, LOCALE_SSHORTDATE, "dd/MM/yyyy") = False Then
MsgBox "Failed"
Exit Sub
End If
PostMessage HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0
'Run the program and open the form.
'Click on Command1 and then exit the program.
'Go to Control Panel and double-click on the Regional Settings icon.
'Select the Date tab. Note that the Short date style has been
'changed to "dd/MM/yyyy" or whatever you choose in boolean question
'Please note you have to exit from the system and wait a moment to check the date format
'End
End Sub