mIRC Homepage
Posted By: bog__ $file(mirc.exe).ctime returns creation time - 18/07/07 05:34 PM
so i have problem with creation time
set %lol $file(%mircdir $+ K00005.txt).ctime returns %lol 1184775522

where is date and time in 1184775522 ?
what m i dooing wrong?
$asctime(%lol)

set %lol $asctime($file(%mircdir $+ K00005.txt).ctime)
Most computers store times and dates as a single number - the number of seconds since 1st January 1970 00:00:00. The 1184775522 you're getting means that the file was created 1184775522 seconds after that date.

In order to convert that number into a meaningful time and date you can use mIRC's $asctime() identifier like so:
Code:
$asctime($file(%mircdir $+ K00005.txt).ctime)

You can also customise the formatting of the time and date using $asctime()'s second parameter. Take a look at $asctime in the help file for a description on how to do that.
This shud b in help next to the $file(filename), or i have older version of helpfile ^^, ether way if this isnt in helpfile under $file(filename), then they shud put it there blush
lol hi SladeKraven i remamber you helping me in the past blush like in 2005 wink
ty one more time wink
I just checked my help file, which is from mIRC 6.21, and it doesn't state that the time returned is measured in seconds, so this might be a good addition, although there are a lot of other things that are missing from the help file as well, and, personally, I feel that this is one of the more minor items.
I guess the helpfile entry for $file was assuming the user would look at the entry for $ctime where it states

$ctime(text)

Returns the number of seconds elapsed since 00:00:00 GMT, January 1, 1970 based on the date that you specify

I agree that there are plenty of places the helpfile should be more verbose, but this is rather low on my list.
© mIRC Discussion Forums