[eluser]JamieBarton[/eluser]
[quote author="Cristian Gilè" date="1294689652"]Create a field in your table and set it as INT. In your model save the date and time using one of the date helper function like mysql_to_unix() or human_to_unix().
For example:
Code:
$year = $this->input->post('year');
$month = $this->input->post('month');
$day = $this->input->post('day');
$hour = $this->input->post('hour');
$min = $this->input->post('min');
$sec = $this->input->post('sec');
$int_date = mysql_to_unix($year.$month.$day.$hour.$min.$sec);
Cristian Gilè[/quote]
Excellent, looks good, I'll give that a go now... And then when I wanted to show it on a page..
Could I use any of PHP's date or time functions? Or would I be stuck with just printing out the year, month, without for example 'rd' in '3rd', or 'th' in '14th' etc..
Could you provide a final example for how I could echo out a result, found from for example, time_and_date in the DB..?
Regards,
Jamie!