Need Help(Autonomous Aquarium Project)

Hello im trying the making autonomus aquarium system.And i have some questions or problems:D My first question is:İm using the ds1302 rtc time and i want the change time data to int .And then i will print remaining time to feed but i have multiple feeding time and i want choose closest one to doing this operation (remaining time =now-closest time). So how can i do this please help me and this is my first post.(Sorry for my bad english)..

i want the change time data to int

I don't understand what you mean by this.

Have you written any code ?

Yes i write a bit of code.İn this sentence i tried to say data from the sensor(string typed) change to integer type.Because i want to do some math operations.

quadexter: Yes i write a bit of code.İn this sentence i tried to say data from the sensor(string typed) change to integer type.Because i want to do some math operations.

http://www.cplusplus.com/reference/cstdlib/atoi/

i tried to say data from the sensor(string typed) change to integer type

OK, that makes more sense.

What sort of sensor is it that outputs a string ?