(Note: All this is conditional on the exact language you're using but i'm pretty sure every language out there certainly must have a time type)Lets break it down.
What is an....
Integer: It's a whole number, no decimal points. You could represent the date as an integer, it might a bit of an odd choice but you could do it. Say for example todays date 13112013. It could work, at least in C the maximum integer value (for a long one anyway) is
2^31. I suppose you could store the time as a Int as well, especially if its in 24 hour time, so, it's 8:30 PM right now. In 24 hour time that would be 20:30 (just add 12 to the hour).
int Time = 20:30 (just realised i had a colon (:), obviously not a valid integer, just ignore that character)
Floating Point: It's similar to an integer in that its an number but it can be a decimal number here. I don't really see how it would be any more advantageous or "smart" to store your time in a float.
Time/Date Type: This is the most advantageous way, it's a special type for the time and more likely than not, the function that *gets* the time will store it in this kind of thing by default. Here is some C++ code i've been tinkering with lately, you dont necessarily need to understand it but just note how the time is never stored in an integer but in a special time type. Later i do convert it to an integer but thats just because i was messing around and only wanted a certain part of the time (the hour) so i could use it as an If condition ( if hour = 5 then print "5 O'clock).
#include <ctime>
#include <iostream>
using namespace std;
int main( )
{
time_t now = time(0); // current date/time based on current system
time_t timer;
cout << "Number of sec since January 1,1970:" << now << endl;
tm *ltm = localtime(&now);
// print various components of tm structure.
cout << "Year: "<< 1900 + ltm->tm_year << endl;
cout << "Month: "<< 1 + ltm->tm_mon<< endl;
cout << "Day: "<< ltm->tm_mday << endl;
int meh = ltm->tm_hour;
cout << meh;
cout << "Time: "<< ltm->tm_hour << ":";
cout << ltm->tm_min << ":";
cout << ltm->tm_sec << endl;
if (meh == 5)
{
cout << "5 O'clock!";
}
}