Hi,
I want to add records to my sql database weeks and sometime months after the date the action took place... then i need to query and sort by date..
what is the best way to add these to my database?
Originally posted by NZ_Kiwi what is the best way to add these to my database?
??? just use a simple INSERT SQL statement. i am missing something here?
Originally posted by devinemke ??? just use a simple INSERT SQL statement. i am missing something here?
Via time stamp? Or plan text 10 November 2004 or another way... remember these need to be ordered by date when i do a query later!
enter dates in whatever the native DATE or DATETIME format that your specific RDBMS supports. (DO NOT store dates as normal strings)
Originally posted by devinemke enter dates in whatever the native DATE or DATETIME format that your specific RDBMS supports. (DO NOT store dates as normal strings)
okay see the first part is beyond me.. that's what i need help with... i didnt want to add it as just "16 November"
read your database's documentation. i'm sure it has very specific methods of storage temporal data. for example: mySQL has a DATETIME field type (YYYY-MM-DD HH:MM:SS).
Originally posted by devinemke read your database's documentation. i'm sure it has very specific methods of storage temporal data. for example: mySQL has a DATETIME field type (YYYY-MM-DD HH:MM:SS).
okay i use mysql so i can use the datetime function but how do i add this...
for example.. when i fill out a form to add another record... how do i enter the date to witch to the datetime code....
drop down menus? textbox?