The code posted is missing both setup and loop so it will never compile.
But I believe the problem is you're confusing TinyGPS with TinyGPS++. TinyGPS has no date function as you're using it.
For TinyGPS you have to do the following to access the date/time:
int year;
byte month, day, hour, minutes, second, hundredths;
unsigned long fix_age;
gps.crack_datetime(&year, &month, &day,
&hour, &minute, &second, &hundredths, &fix_age);
You then use year, month, day, hour, etc. as you need.
Hope this helps,
Brad
KF7FER