User forums > Using Code::Blocks

Date format

(1/1)

drChaos:
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);
--- End code ---

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?

mandrav:

--- Quote ---I think that standard Sqirrel lib "system" didn't link
--- End quote ---

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

drChaos:

--- Quote from: mandrav on March 04, 2007, 05:36:45 pm ---
--- Quote ---I think that standard Sqirrel lib "system" didn't link
--- End quote ---

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

--- End quote ---

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

Navigation

[0] Message Index

Go to full version