473,396 Members | 1,743 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,396 software developers and data experts.

How to search a dates earlier than January 1, 1753

10
Hello Experts.

I have a database that deals with history. Since MSSQL 2000 cannot accept dates earlier than Jan 1, 1753 I converted my column to CHAR.

My problem now is I cannot find dates on a Range..If supposing my datatype is DATETIME, I would use DATE1 BETWEEN STARTDATE AND ENDDATE.


Thank you in advance.
Aug 7 '07 #1
2 2310
hariharanmca
1,977 1GB
Hello Experts.

I have a database that deals with history. Since MSSQL 2000 cannot accept dates earlier than Jan 1, 1753 I converted my column to CHAR.

My problem now is I cannot find dates on a Range..If supposing my datatype is DATETIME, I would use DATE1 BETWEEN STARTDATE AND ENDDATE.


Thank you in advance.

you can use where clause like

Expand|Select|Wrap|Line Numbers
  1. where DateField >= '<FromDateValue>' and DateField >= '<ToDateValue>'
Aug 7 '07 #2
you can use where clause like

Expand|Select|Wrap|Line Numbers
  1. where DateField >= '<FromDateValue>' and DateField >= '<ToDateValue>'
The important thing when using this is to cast or convert the date in the correct char/varchar format. YYYYMMDD HHMMSS will let you use the between comparison above.

You may have to stuff a leading zero into months and days (and years) that are not comprised of the full 4 digits.
Oct 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql,...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
6
by: John | last post by:
Hello, I have an Access DB with a column holding dates from present day back to around year 1702, and I am trying to run DTS Import with this MDB, which fails due to a conversion error. MSDN...
3
by: Kevin Gibbons | last post by:
Hello all, I've browsed through past usenet archives, but can't seem to come across quite the javascript I'm looking for. I'm looking for a simple javascript that will display the date as such:...
6
by: Trekmp | last post by:
I currently work in ASP and am in the process of moving some application across to PHP. At present I store dates in a database in numerical format 38694, which is 08/12/2005. In ASP its very easy...
14
by: Cesar Ronchese | last post by:
Hello! I've built a program that show some dates to users. I got a problem when users have different configured time zone machines, where: - One machine that determined time zone the date...
12
by: Dixie | last post by:
I am trying to calculate the number of workdays between two dates with regards to holidays as well. I have used Arvin Meyer's code on the Access Web, but as I am in Australia and my date format is...
3
by: Chung Leong | last post by:
Here's the rest of the tutorial I started earlier: Aside from text within a document, Indexing Service let you search on meta information stored in the files. For example, MusicArtist and...
2
by: Jim Carlock | last post by:
(1) Does PHP provide any way to handle dates prior to 1980? I know there's problems with Microsoft Windows NT and all Windows NT operating systems will allow a date prior to 1980 to be placed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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,...

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.