Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: drChaos on March 04, 2007, 03:56:58 pm

Title: Date format
Post by: drChaos on March 04, 2007, 03:56:58 pm
I want to print current date in format MM/DD/YYYY.
I have tried to write embed script.
Code
local curDate;
date(time(),curDate);
print(curDate.month+"//"+curDate.day+"//"+curDate.year);

But it gives me an error : "The index date does not exist."
I think that standard Sqirrel lib "system" didn't link and I guess why :).
But how I can take date or how can I change the date output format?
Title: Re: Date format
Post by: mandrav on March 04, 2007, 05:36:45 pm
Quote
I think that standard Sqirrel lib "system" didn't link

That's right, we haven't enabled squirrel's std lib yet...
Title: Re: Date format
Post by: drChaos on March 09, 2007, 10:44:57 pm
Quote
I think that standard Sqirrel lib "system" didn't link

That's right, we haven't enabled squirrel's std lib yet...

And what should I do? I havn't any funtion that can give me date/time in any format.