Page 1 of 1

FormatDate and file creation

Posted: Sat Apr 24, 2010 8:26 pm
by purenet
Hello,

Is this bug or too easy to understand?

Tested with PB 4.41 x86 Windows.

Code
-----
filename.s = FormatDate("%yyyy-%mm-%dd_%hh:%mm", Date()) + ".txt"
CreateFile(0, "c:\" + filename)

Result
------
Filename created is too short: 2010-04-24_22

Re: FormatDate and file creation

Posted: Sat Apr 24, 2010 8:34 pm
by Kaeru Gaman
a colon is not a legal char for a filename.

Re: FormatDate and file creation

Posted: Sat Apr 24, 2010 8:35 pm
by Demivec
':' is not allowed in a filename on the windows OS.

@Edit: too slow. :oops:

Re: FormatDate and file creation

Posted: Sat Apr 24, 2010 8:37 pm
by purenet
Of course. Blind me.

Thanks!