473,947 Members | 15,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Fiel ds.Item("NewsDa te").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 1765
> When I'm writing to the page I'm putting
<%=(rsNews.Fiel ds.Item("NewsDa te").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("News Date")%>

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
1974
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
2681
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
1533
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 table,i do a download and then compare it to a previous table and do a unmatched query.Whichever ID's do not match,I need to delete,but my delete query does not fire.The query is a simple one to one join of both the tables. Any suggestions?
6
2036
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 something like Qt or Tcl/Tk (I'll also be poting to linux), but for now, i am running out of time and getting quite desperate. Does anyone out there know where I can get the header (and also the associated lib to link it against - I think this is...
3
3018
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 about the mmmmmmsUUU part, as that counts milliseconds and microseconds. The sUUU is a three digit offset indicating the number of minutes that the originating time zone deviates from UTC. Other than that, the format is
5
1355
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")) Then Messagebox.Show("Date specified is less than current") Else Messagebox.Show("Date specified is greater than current") End If
3
1694
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 seen other people working on the same or similar projects, but the problem I run into is that in Java, there seems to be more than one way to skin a cat. (No cats were harmed in the writing of this post.) I am able to enter multiple items and their...
4
2883
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 web page hosted on a unix driven file server. The user wants to have this file converted to a pdf. My page takes the query string and turns it into a windows unc path, then I copy the file down to the web server and place it into a directory. This...
8
6142
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 don't believe it is. The reason for the "Date/time precision" title is that I would like to know whether anyone can tell me to what precision a date/time value is stored in Access. And how it might be affecting my search. (I have spent some time...
0
9982
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11571
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11155
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11344
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10690
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8254
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7429
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
4537
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3541
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.