Purebasic 6.x file creation date
Posted: Tue Mar 10, 2026 9:26 pm
Strange behavior when working with file creation dates. The issue is observed in the 6.x series.
output:
1
1408979700
201408251515
Code: Select all
FullPath.s=GetCurrentDirectory()+"Text.txt"
If CreateFile(0, FullPath)
For a=1 To 10
WriteStringN(0, "Line "+Str(a))
Next
For a=1 To 10
WriteString(0, "String"+Str(a))
Next
CloseFile(0)
Else
MessageRequester("Information","may not create the file!")
EndIf
Debug SetFileDate(FullPath,#PB_Date_Modified,ParseDate("%yyyy%mm%dd%hh%ii", "201408251415"))
DateCr = GetFileDate(FullPath, #PB_Date_Modified)
Debug Str(DateCr)
Debug FormatDate("%yyyy%mm%dd%hh%ii", DateCr)1
1408979700
201408251515