I am using this code to display the date: For example: 02 January 2002: I want to display it like this: 01/02/2002 But I don't know why it display Day before Month (02/01/2002) I don't know why??? Please help:
<%@LANGUAGE="VBSCRIPT"%> <% function DoDateTime(str, nNamedFormat, nLCID) dim strRet dim nOldLCID
strRet = str If (nLCID > -1) Then oldLCID = Session.LCID End If
On Error Resume Next
If (nLCID > -1) Then Session.LCID = nLCID End If
If ((nLCID < 0) Or (Session.LCID = nLCID)) Then strRet = FormatDateTime(str, nNamedFormat) End If
If (nLCID > -1) Then Session.LCID = oldLCID End If
DoDateTime = strRet End Function
str = "2/1/02" %>
<html> <body bgcolor="#FFFFFF" text="#000000"> <%= "Old Format = " & str & "<Br>" %> <%= "New Format = " & DoDateTime( str, 2, 2057 )%> </body> </html>