Ask a Question related to ASP Database, Design and Development.
-
Chad S #1
ASP SQL Server 2000 Date/Time Formating
Hello,
I have two questions which I would appreciate some help with.
1. Date Formating when Inserting into SQL Server 2000
I'm currently passing YYYYMMDD into a datetime field. When I look at
the database it is in the format MM/DD/YYYY. However, if the date is
20040303 it's inserted as 3/3/2004. How do I keep the zero's in the
date when inserting into the database ?
2. Time Formating when Inserting into SQL Server 2000
I'm trying to insert military time to a datetime field. Is there a way
to format this in the database ? I've only had success using hh:mm
AM/PM. I only want to use military time.
Thank you so much !
Chad
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Chad S Guest
-
date/time field from access 2000 db getting -1 in textbox on form
I am stuck in using Access 2000 with on Windows 2000 server. I get a negitive 1 for a value. My code $DB_Conn = new... -
Exception error with date/time (Access 2000)
I am picking up a strange exception error for the following statement: If Rs.EOF OR DATEDIFF("d",rs("DateTime"),NOW()) Then '// End If Is... -
Formating differenc between Web server (IIS) on WinXP or Win 2000?
I have developed an bound datagrid on WinXP mit VS.2003 and well formatted the 7 columns. After deploying the project to an Windows 2000 server... -
Convert date/time to date in SQL Server 2000 statement
Can this be done? tia -
Formating date,time
Using MySQl and PHP I am trying to get a standard time stamp to for so it reads: Day, d/m/y (Fri, 30/11/03) The database holds the info like... -
Jeff Cochran #2
Re: ASP SQL Server 2000 Date/Time Formating
On Fri, 20 Feb 2004 09:48:51 -0800, Chad S <webaccess@hotmail.com>
wrote:
You need to understand that DateTime data types in SQL aren't stored>I have two questions which I would appreciate some help with.
>
>1. Date Formating when Inserting into SQL Server 2000
>I'm currently passing YYYYMMDD into a datetime field. When I look at
>the database it is in the format MM/DD/YYYY. However, if the date is
>20040303 it's inserted as 3/3/2004. How do I keep the zero's in the
>date when inserting into the database ?
>
>2. Time Formating when Inserting into SQL Server 2000
>I'm trying to insert military time to a datetime field. Is there a way
>to format this in the database ? I've only had success using hh:mm
>AM/PM. I only want to use military time.
as any particular format. When you pass formatted date/time strings,
SQL may or may not get what you wish inserted into the field. You
format the date/time however you wish in the output, or rely on the
client settings for this.
See also:
[url]http://www.aspfaq.com/show.asp?id=2260[/url]
Jeff
Jeff Cochran Guest



Reply With Quote

