SA-MP Forums Archive
getdate help. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: getdate help. (/showthread.php?tid=549625)



getdate help. - TheCoopster - 07.12.2014

I'm making a subscription based system for housing and I need to read the date from a string. Anyone know how to do this?


I need to read from a string similar to this. 07/12/2014.

How do I get the Day, Month, and Year from this string?


Re: getdate help. - PowerPC603 - 07.12.2014

"strmid" can do that for you, or even sscanf.

pawn Код:
new Day, Month, Year;
sscanf("07/12/2014", "p</>iii", Day, Month, Year);
This should work.


Re: getdate help. - TheCoopster - 07.12.2014

Thanks