devxlogo

Access Client’s Windows Date Format

Access Client’s Windows Date Format

Question:
I have a date field on my ASP page. I want to restrict the user for entering only the dates in his Windows 95 machine’s date format. How can I validate the date when I am using VBScript in my ASP page for client-side processing?

Answer:

If you are using client-side VBScript then you can use this code to populate a text box called ‘dtNow’ in a form called ‘thisForm’.

Call WinLoad and then examine the value of the field dtNow. It will contain the date in the format of the client machine. This will only work with Internet Explorer though.

See also  Professionalism Starts in Your Inbox: Keys to Presenting Your Best Self in Email
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist