How to transform 01012010 style dates to normal? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to transform 01012010 style dates to normal? (
/showthread.php?tid=142574)
How to transform 01012010 style dates to normal? -
un4seen - 18.04.2010
Hi. I have dates in format 01012010 ([day][month][year]).
It's with leading zeros. I want to get day, month, year from this. (ex. day = 1, month = 1, year = 2010)
It will be something like UncodeDate(datecode, &day, &month, &year); but I don't know how to wrote this.
Thanks.
Re: How to transform 01012010 style dates to normal? -
.(Infinite Imagination). - 18.04.2010
you need this?
Код:
stock GetDMY(&day, &month, &year)
{
new d, m, y;
getdate(y, m, d);
day = d;
month = m;
year = y;
return 1;
}
Re: How to transform 01012010 style dates to normal? -
Kyosaur - 19.04.2010
Quote:
Originally Posted by © ŦĥЗ ǺĽẽẌṖŎịŚỘń
you need this?
Код:
stock GetDMY(&day, &month, &year)
{
new d, m, y;
getdate(y, m, d);
day = d;
month = m;
year = y;
return 1;
}
|
What a dumb function lol, all you basically did was rename getdate to GetDMY.
Re: How to transform 01012010 style dates to normal? -
cloud9 - 19.04.2010
Quote:
Originally Posted by © ŦĥЗ ǺĽẽẌṖŎịŚỘń
you need this?
Код:
stock GetDMY(&day, &month, &year)
{
new d, m, y;
getdate(y, m, d);
day = d;
month = m;
year = y;
return 1;
}
|
lmao
pawn Код:
//well anyways here is it, not tested
//lets say you have stored the value in a string called "Date"
new Date[2],Month[2],Year[2];
strmid(Day, Date, 0, 1);
strmid(Day, Month, 2, 3);
strmid(Day, Year, 4, 7);
Re: How to transform 01012010 style dates to normal? -
un4seen - 22.04.2010
A refresh!
Re: How to transform 01012010 style dates to normal? -
ziomal432 - 22.04.2010
Код:
GetDMY(&day, &month, &year)
{
getdate(year, month, day);
}