VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simply way to check the what is the date format in the Computer's Regional setting.

by Raghuraja. C (21 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 19th August 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simply way to check the what is the date format in the Computer's Regional setting.

API Declarations


You can check the date format on the Regional setting and stop the project or continue

Rate Simply way to check the what is the date format in the Computer's Regional setting.



If Format$(38576, "Short Date") <> "2005/08/12" Then
    MsgBox "The Current date format is yyyy/MM/dd", vbExclamation
    End
End If
'--------------------------------------------------------------------
'To Check the Date format is DD/MM/YYYY
If Format$(38576, "Short Date") <> "12/08/2005" Then
    MsgBox "The Current date format is DD/MM/YYYY", vbExclamation
    End
End If
'--------------------------------------------------------------------
'To Check the Date format is MM/DD/YYYY
If Format$(38576, "Short Date") <> "08/12/2005" Then
    MsgBox "The Current date format is MM/DD/YYYY", vbExclamation
    End
End If
'--------------------------------------------------------------------

Download this snippet    Add to My Saved Code

Simply way to check the what is the date format in the Computer's Regional setting. Comments

No comments have been posted about Simply way to check the what is the date format in the Computer's Regional setting.. Why not be the first to post a comment about Simply way to check the what is the date format in the Computer's Regional setting..

Post your comment

Subject:
Message:
0/1000 characters