473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

SQL Date Woes...Please Help

I am creating a news script in ASP 3.0 with SQL 2000 backend. I'm new
to SQL (I used to use Access exclusively... :( )

In any case I have a database of the News set up like this"
NewsIDNum int ident
NewsTitle char
NewsDate smalldate
NewsText Text

When I'm writing to the page I'm putting
<%=(rsNews.Fields.Item("NewsDate").Value)%>

This is yielding nothing. I am going to be writing a series of news
stories to each page and each should display the date it was written.

Dummy Check:

- I checked the db to be sure the field had date data in it
- I made sure nothing was misspelled
- I read aspfaq.com but didn't see my answer there in terms I
understood it seemed more useful for if you were using 1 date on a
page or not pulling the date from the database.

Any help would be greatly appreciated.

Thank you!
Jul 19 '05 #1
2 1738
> When I'm writing to the page I'm putting
<%=(rsNews.Fields.Item("NewsDate").Value)%>

This is yielding nothing.


What is the query that populates rsNews? Showing more code is usually
better than showing less code (though there is a limit; if your ASP page is
8,000 lines, please don't post it all, just the relevant parts).

Also, what does the following yield?

<%=rsNews("NewsDate")%>

Are you sure the query returns any records at all? Are you using an .EOF
check, or on error resume next? (Again, this shows how more code would be
useful.)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #2

Actually a co-worker and I figured out my problem after I posted this.

Essentially I was trying to use the CONVERT function in the code of my
page at the point where I was writing from the database to the actual
HTML page. I needed to do it within my Select Statement.

ASPFAQ saves the day again with all the great codes for the conversion!

Thanks for the super resource and quick response.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Raven | last post by:
Using either MySQL functions or PHP, how can I convert a date filed in the format of (varchar) Aug 10, 1950 to a unix timestamp? tia
6
by: Gerry Viator | last post by:
Hi all, I have a textbox were a time is typed in like: upto 4 numbers 1900 300 1000 1425 I would like as they type the text to show todays date plus the time they
0
by: Rob | last post by:
Hello, I get an date field as a part of download in the format 01 Mar 04 12:00:00. I want this to be converted as a short date.How do i proceed? Also not connected with the above but in the same...
6
by: Dr Ann Huxtable | last post by:
Hi All, I am trying to compile an old C code written for the Borland Compiler on the DOS platform. This is a tactical solution and I intend to rip out the GUI side of things and slap on...
3
by: Kevin Vaughn | last post by:
I am trying to convert a date from this format: yyyymmddHHMMSS.mmmmmmsUUU to a format that ASP.NET (VB.NET) understands. The above date format is used by the WMI datetime type. I don't care...
5
by: Kevin | last post by:
I have a simple application that handles authentication, and one of the things it checks is password aging. If I have something like this: If ("02/14/2007" <= Date.Today.ToString("MM/dd/yyyy"))...
3
MonolithTMA
by: MonolithTMA | last post by:
Greetings all, I am new here, and aside from my introductory post, this will be my first. I am working on an Inventory program for a class I am taking. I've searched the forums here and have...
4
by: =?Utf-8?B?VkIgSm9ubmll?= | last post by:
I am at my witless end here, please help! I have an ASP.Net aspx web page, hosted on Windows Server 2003, that receives a query string with the path to an autocad drawing file selected from a...
8
by: Killer42 | last post by:
Hi all. I have an interesting situation; searching a Date field for my exact value fails, but including it in a range works. I know this sounds like the usual beginner's date/time woes but I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.