473,402 Members | 2,061 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,402 software developers and data experts.

Handling Dates

(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 upon
a file, but it ends up not being able to display the date (probably an
Windows Explorer specific issue).

(2) I'm looking for for ways to store dates and process dates (dates only).
This probably ends up as a database specific issue, so I'm wondering
about handling dates (YYYY.MM.DD format) with databases. I don't
have any experience involving this, and the database I'm playing with
currently offers no date support at all (SQLite)... and from what I've
played with in the past, Windows tends to convert dates back and forth
between text and a number (causing a problem with dates prior to 1980
specifically with Windows Explorer).

Anyways, this is a pretty good topic I think. And I'd appreciate any
help or suggestions or comments about this topic.

Thanks.

--
Jim Carlock
Post replies to the group.
Jun 15 '07 #1
2 2173
..oO(Jim Carlock)
>(1) Does PHP provide any way to handle dates prior to 1980?
The beginning of the Unix epoch is 1970.

Recent PHP versions (>= 5.1.0) support negative timestamps, which allows
for dates between 1901 and 2038.
>(2) I'm looking for for ways to store dates and process dates (dates only).
This probably ends up as a database specific issue, so I'm wondering
about handling dates (YYYY.MM.DD format) with databases.
Most databases have their own date types. In MySQL for example dates are
stored as YYYY-MM-DD in special DATE or DATETIME columns.
>I don't
have any experience involving this, and the database I'm playing with
currently offers no date support at all (SQLite)... and from what I've
played with in the past, Windows tends to convert dates back and forth
between text and a number (causing a problem with dates prior to 1980
specifically with Windows Explorer).
What do you want to do actually? What does the Windows Explorer have to
do with PHP?

Micha
Jun 15 '07 #2
"Michael Fesser" wrote...
: What do you want to do actually? What does the Windows Explorer
: have to do with PHP?

Not sure that it has anything to do with PHP. I specifically noticed the
problem with Explorer. Was wondering if it was an OS issue and if
PHP dealt with it in some other way.

And a year or so ago, I extracted a file from a zipped package. The
file was dated a long time ago but when it came out of the archive,
Explorer didn't display a date upon the file. The unpacking program
seemed to handle the file well. Windows Explorer failed, failed though.

I was just playing around with dates trying to figure out how to get
a database to handle dates. I think it'll be pretty easy to use 3 or 4
32-bit integers to represent dates. Only need one to represent the
day of the year, and the other three should provide enough bits to
handle an ancient past. Wondering how many bits are needed to
handle the life of Earth. :-)

Still got some more playing to do. I personally have some files
dating back to about 1990 and earlier (America Online Beta Versions
(DOS), they called it ), and then there are some archived
files dated prior to 1980. The dates after Dec 31, 1979 read fine via
Windows Explorer. I didn't even have a computer until 1982 or 1983
(an Atari 400 and later a hand me down IBM PC Jr with a wireless
keyboard which got bad reviews in the magazines - the keyboard).

Just started wondering about dates and databases. PHP can handle
dates like birthdates dating back to 1890? And what type of database
someone uses to handle prehistoric dates?

The date upon the following file...
Thursday, January 01, 1970, 12:00:00 AM
http://67.8.106.162/
vbsight3a.gif

The date upon the following file...
vbsight.tar.gz
Monday, December 31, 1979, 11:59:00 PM

<shrugWindows handles the dates okay. Explorer though... :-) Feel
free to download the files and look at the files or whatever. They're
just some gif images. I'm giving them away.

--
Jim Carlock
Jun 16 '07 #3

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

Similar topics

3
by: kmcnet | last post by:
Hello Everyone and thanks for your help in advance. I am developing an application that utilizes a separate class library for data access to a SQL Server database. One of the tables has several...
3
by: Sune | last post by:
I'm working on a system that requires alot of date handling, and i'm getting pretty tired of doing custom calculating when modifying dates, so i hope someone would be able to help me. Is there any...
8
by: Jeremy | last post by:
We have some date fields in our HTML forms in various places. In the accounts package we use, there is some pretty nifty date handling. It has a standardised date format of dd/mm/yyyy and if you...
2
by: Child | last post by:
I am trying to insert some data into a table and keep gettting the error: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. Its me testing the database so...
4
by: Tad Marshall | last post by:
Hi, I'm having limited luck getting an ApplicationException to work right in my code. This is VB.NET, VS 2003, Windows XP SP2, .NET Framework 1.1. I thought it would be convenient to take...
2
by: Yog | last post by:
Is there a best way to handle various formats of dates for SQL server?. The data comes in various input files with different date formats. The ParseExact function looks like an "evil" and it...
3
by: Dr John Stockton | last post by:
For an all-numeric Gregorian date to be intrinsically unambiguous, it must generally be of the form /\d{3,}\D+\d+\D+\d+/ ; and we've discussed handling that. But if the month is given in...
5
by: AAJ | last post by:
Hi Does anyone know of any good publically available set of standards for managing dates when dealing with a database server (in my case SQL Server 2000 and c# VS2005). At the moment, if I...
4
by: Jeff Goodman | last post by:
If there is a better newsgroup to post this in, please let me know. I am a relatively new VB.NET/SQL 2000 programmer. I am working with data imported into SQL2K from Access. Many of the dates...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...

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.