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

Date storage format

Good day, and Happy New Year!

I'm trying to teach myself some PHP and MySQL and the project that I've
decided to build will be dependent on queries involving comparisons of
dates. I'd like some advice, please, on whether I should -

1. Store the date (2008-01-01) in the MySQL table as a date and compare to
that, or...
2. Create a/ timestamp/s for the date/s in question, store the timestamp and
then compare to that.

If the timestamp is the way to go, should that column be of type "Timestamp"
or will that cause the string to be altered to a MySQL timestamp?

Thank you in advance for any assistance.
Steve E.


Jan 1 '08 #1
0 1212

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

Similar topics

13
by: Bjorn | last post by:
Hi, The Access table "dayoff" contains following dates: 8/4/2004 till 8/14/2004 (in dd-mm-yy format). 'dat1' and 'dat2' contains dates coming from two combo-boxs. When 'dat1' contains...
2
by: yasaswi | last post by:
I have date values in mm/dd/yy format in a text file. How can use the LOAD command or mysqlimport command and load those date values. Currently I just load the date values as text into MySQL tables...
4
by: Bell, Kevin | last post by:
Anyone aware of existing code to turn a date string "8-15-05" into the number 20050815? The dateutil module has a parse method that looks perfect, I downloaded and unzipped it, but could figure...
2
by: pradeep | last post by:
hi! i want to know how define a datatype to input date by user and store it.
3
by: mike | last post by:
I am struggling with a problem that should be easy to solve it but has me stumped. I am writing data to a table using ADO and writing the date to this table. I have a calendar control on the...
29
by: james | last post by:
I have a problem that at first glance seems not that hard to figure out. But, so far, the answer has escaped me. I have an old database file that has the date(s) stored in it as number of days. An...
3
by: news | last post by:
Hello, Can someone help me with this request? 1. Data in my access database have the format "9/10 2005" 2. When I show all dates within an asp page I get the following format "9/10/2005" The...
3
by: josh3006 | last post by:
Hi there I'm new in DB2, currently i'm into java development The problem that i'm facing is that when i use JSP page to save, the date is correct when i pass(from JSP page) to database, but when i...
9
by: insomniux | last post by:
Hi, I am having a problem with formatting the default value of a date field. It has been discussed earlier in many topics, but still I cannot solve the problem. What's happening: I have various...
7
by: mr.nimz | last post by:
hello, this is antenio. recently i've come to a problem. i got a way through it, somehow, still it left me in a curious state, so i'm posting it here, if i can get an answer from some techy, ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.