problem with Date function(help pls)

hi friends
i want to write a date function that Receipt a number ( for example 1267859 )
and turn it to a date ( for example 2014/10/2 ).
how can i write this ??? what is the formula ??? pls help . i just need the formula. Thanks.
could you show us what you tried?

write a date function that Receipt a number ( for example 1267859 )
and turn it to a date ( for example 2014/10/2 ).


sorry I couldn't get that one... Is the receipt number anyway related to date?
Last edited on
look with this function we turned a date to DAYS...this function show us the number of days.
1
2
3
4
5
6
7
8
void Date :: inDays()   
{
	unsigned long d = 0;
	cout<<"\n\n"<<(year - 1200 ) * 365 +
	(month - 1 ) * 30 +
	day<<"\n\n";
	
}


now i want a formula that do this Vice versa for example we give it the number of the days ( like 852164) and it give us the date of it .
Topic archived. No new replies allowed.