murgeltd
06-01-2006, 05:17 PM
Not sure if this is the right section (I am coding in asp) so forgive me if it's not.
In the past I have stored dates in a database as one field in a record. I have recently viewed some developers code that separates the day, month, year as three different fields in a database of 2 numbers only.
That's all well and good, but I am trying to create a latest news page that will only display the three latest item in the news table, based on posted date.
I can visually work out how I code to check for the three latest records based on one date field, but is there an easy way to concatinate three fields into one date variable and their do a condition on that??
Any comments on best practise for dates is much appreciated.
Regards,
Andy
In the past I have stored dates in a database as one field in a record. I have recently viewed some developers code that separates the day, month, year as three different fields in a database of 2 numbers only.
That's all well and good, but I am trying to create a latest news page that will only display the three latest item in the news table, based on posted date.
I can visually work out how I code to check for the three latest records based on one date field, but is there an easy way to concatinate three fields into one date variable and their do a condition on that??
Any comments on best practise for dates is much appreciated.
Regards,
Andy