GLBasic forum

Main forum => Bug Reports => Topic started by: ampos on 2012-Mar-13

Title: FILEDATE?
Post by: ampos on 2012-Mar-13
Can we have the command "GETFILEDATE(f$)"?
Title: Re: FILEDATE?
Post by: Kitty Hello on 2012-Mar-14
what should it return? An integer with the file time in second since 1.1.1900 ?
Title: Re: FILEDATE?
Post by: kanonet on 2012-Mar-14
I would prefer the date to be in the same format like PLATFORMINFO$("TIME").
Title: Re: FILEDATE?
Post by: Moru on 2012-Mar-14
If you return it as seconds from some epoch you also need to give us some FORMAT_DATE command :-)
Title: Re: FILEDATE?
Post by: Slydog on 2012-Mar-14
Or, this came up in another recent thread about file sizes greater than 2Gb, and a solution was a new data type.
You could always create a new DATE data type!

And / or, it really is just a float internally I think (days on left of decimal, time on right side).
Then math functions would work as expected (IF date1 > date2, or date3 = date1 + date2).
You would just need a format function as suggested by Moru.
You could add more functions such as seeding the date value (date1 = DATE_CONVERT(2012, 3, 14, 23, 59, 59)).

If not, kanonet's suggestion makes sense, to make all date functions consistent (if you have existing code already to handle dates).