Date to integers?
#1

Hello!
I'm making my ban command and auto detecting if they are unbanned date.
so I wonder how to get a date such as '2012-02-23' into integers year = 2012, month = 2, day = 23
I've got an idea on strcmp to compare if there are any numbers inside there wich is a date and in some way convert them to integers, but this shoud take some work as i would need to check for every single number that can be in there.
So is there any way to get this to work?
The compare thing i use is i get the date and for every year i * 365, month*30 and then add it all together with the day and i should do this with the mysql saved date to.

Or is there any function to compare 2 dates?

Sorry if you don't understand, just ask and I'll try to explain.

I'm thankfull for every answer i get
Reply


Messages In This Thread
Date to integers? - by Ranama - 01.07.2012, 21:32
Re: Date to integers? - by Vince - 01.07.2012, 22:02
Re: Date to integers? - by pyrodave - 01.07.2012, 22:05
Re: Date to integers? - by Ranama - 01.07.2012, 22:17
Re: Date to integers? - by cessil - 02.07.2012, 03:39
Re: Date to integers? - by CaptainMactavish - 02.07.2012, 03:42
Re: Date to integers? - by AndreT - 02.07.2012, 05:28

Forum Jump:


Users browsing this thread: 1 Guest(s)