Dd/mm/yyyy Vs Mm/dd/yyyy
I am using sql server backend. Previous programmer coded the way date are display/ enter in mm/dd/yyyy using a file name date.asp. Whats in the date.asp file is something like this :
<script language="javascript">
function submitinfo() {window.document.frmcal.submit();}
function displayDate(sDay, sMonth, sYear) {
this.dateField = opener.dateField;
this.inDate = dateField.value;
dateField.value = sMonth + "/" + sDay + "/" + sYear;
window.close()
}
</script>
However, the database field is in smalldatetime and I notice the dates were in dd/mm/yyyy. e.g. 25/Dec/2006
Lately, I changed the date.asp to dd/mm/yyyy as the following: Code:
View Replies
ADVERTISEMENT
I have two folders on my webserver or under wwwroot/inetpub. A response.write date() date in the format dd/mm/yyyy in one folder and mm/dd/yyyy in the other folder. Why is this?
I use one of the folders as a development platform where I create, edit and test files before copying them to the other folder (Production). Howver all the files that use dates in the SQL string will work in the test platform but not production one because of the chnage in the date format.
View Replies
View Related
I have date on my ASP page being displayed as mm/dd/yyyy format. I want it to be displayed as mmm-dd-yy or any of the formats as shown in the example below. For example 10/21/2003 should be displayed as 21 October,2003 or Oct-21-2003 or 21-Oct-2003.
As long as there is a description of the month. I do not want anything else like weekday or time to be displayed. FormatDateTime has limited parameters . The closest I have is FormatDateTime(Date,1) which displays the week day also.
View Replies
View Related
I beleive that the admins will put it in the correct section if it doesn't belong here. Anyway. I have created a program that stores some info in an access database. The problem is with date. The asp code creates the date in format dd/mm/yyyy. In the server's regional settings the date format is dd/mm/yyyy and when I open the database the date on the date field is displayed in dd/mm/yyyy.
When I create a query in asp with the between clause and put two dates in dd/mm/yyyy format I get no results, but If I give the two dates in mm/dd/yyyy I get the right results. I use Office 2003 on Windows 2003 Enterprise.
View Replies
View Related
I am in Ausatralia, working on a machine that is set to Darwin timezone and the date format is dd/mm/yyyy
When setting up the date fields in a table in access on this machine, the format options are in the dd/mm/yyyy format
When I write dates to an access db on this machine, it writes them as dd/mm/yyyy - so far so good
But I have just found that if I want to pull information based on a date where the first number is greater than 12 then it will pull the right information,
eg: 21/06/2007 will give info for 12 Jun 2007
but if the first number is less that 13 it will reverse it!
eg: 10/06/2007 will give information for Oct 6 2007
How do I get it to give the dates with the first number below 13 to produce the dd/mm/yyyy format like the dates where the first number is 12 or greater?
View Replies
View Related
I am trying to query a database with a combination of surname and date of
birth but it is giving me wrong results in certain conditions.
It is the mm/dd/yyyy and dd/mm/yyyy stuff that is not making it work.
If I enter date like 25/12/1976 then it works fine as the date will not be
valid like 12/25/1976 and everything works fine and my query executes
properly.However if I enter a date like 07/08/1976 (07-Aug-1976) it think the query
thinks I have entered 08/07/1976 (08-July-1976) and brings back the wrong
result.
View Replies
View Related
i have a text bow which gets the date in the dd/mm/yyyy forma but when i try to insert it into the datase. i get this error
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
View Replies
View Related
I'm using Access database. There is a date field with the medium format (dd-mon-yy).
Through ASP Form, I enter a date which is in mm/dd/yyyy, How do I convert this in to medium date.
View Replies
View Related
I am using follwing code to get date
dt=date()
response.write(dt&"<hr>")
output is
1/6/2005 i.e. mm/dd/yyyy
i want it as dd/mm/yyyy
ie. 6/1/2005
............
View Replies
View Related
I have a form in which I query an access db, in this form I have a date selection input box. The format of the date in this function is dd/mm/yyyy. The format of the date in the access db is also dd/mm/yyyy. This is where I am having a problem. When submit this form with the current date it returns no values, although there are values in db. eg. submit form with 05/01/2005 no results. submit form with 01/05/2005 then the results are returned. Problem the latter format is mm/dd/yyyy and not dd/mm/yyyy.
How can fix this. I have a function that I have used previously to format dates, but this would not be viable in this program as it includes to many pages any this would affect all of them.
Below is the code for the page I am having trouble with: ...
View Replies
View Related
I'm trying to format the output of a MS SQL date/time field into an asp page. It's currently coming out as:
Sun Jan 20 00:00:00 UTC 2002
I need this to format to 'dd/mm/yyyy'. Is this possible with JScript, and if so, how?
View Replies
View Related
How do I format dates in dd/mm/yyyy format? I am pulling the dates from a MS Access 97 database using ASP 2. I can get the dates in dd/mm/yy format, but really need the 4 digit year.
View Replies
View Related
this is my code.
SQL1="SELECT START_DATE, END_DATE FROM project"
rs1.Open SQL1
<td width="50%" align="middle"><b> <%=rs1("START_DATE")%> - <%=rs1("END_DATE")%></b></td>
The START_DATE and END_DATE will return the date in YYYY-MM-DD. I want to change it to DD-MM-YYYY.
Actually i got try a lot of method for example setdateformat. but really cant solve it. I already post this question before but really cant have a solution.
View Replies
View Related
I have next problem
System date format is dd.MM.yyyy
But ASP returns MM/dd/yyyy
How to avoid next problem;
Users always enter dates on form like dd.MM.yyyy How to convert it to system date?? Or why ASP returns MM/dd/yyyy like system date is?
View Replies
View Related
I need a way to convert a date in DD/MM/YYYY format (the time is also present but that's not too important in this case....) into an Epoch integer using ASP/VBScript....for example:
The date 01/01/2006 would be converted to 1136073600
I need a formula to do this for me in ASP/VBScript..
View Replies
View Related
I have a JScript page which pulls a date from an SQL-server table who's data type is datetime.
How can I display this on my page as e.g. 19/02/2004? At the moment it shows as: Tue Feb 19 00:00:00 UTC 2004.
View Replies
View Related
how to format date in MM/DD/YYYY format in ASP?
View Replies
View Related