PlanetSquires Forums

Support Forums => General Board => Topic started by: Jim Dunn on May 11, 2019, 11:57:43 AM

Title: AfxGetFileCreationAstroTime
Post by: Jim Dunn on May 11, 2019, 11:57:43 AM
Hey Jose,

First, let me apologize for another "PowerBASIC" question.  Recently I needed to update an old PowerBASIC program for a client who didn't want to go FreeBasic... anyway, I had difficulty comparing AfxAstroDay with AfxGetFileCreationTime and didn't want to spend more time on it (it was a freebie for the client)... so I wrote a quick AfxGetFileCreationAstroTime function:

Code: [Select]
FUNCTION AfxGetFileCreationAstroTime(BYVAL theFile AS WSTRING) AS LONG
theFileTime = AfxGetFileCreationTime(theFile)

LOCAL lft AS FileTime, st AS SystemTime
FileTimeToLocalFileTime(BYVAL VARPTR(theFileTime), lft)
FileTimeToSystemTime(lft, st)

FUNCTION = AfxAstroDay(st.wDay,st.wMonth,st.wYear)

But, my questions are:
Thx!  : )

P.S.  And, again, thanks for all the help you've been over the years!
Title: Re: AfxGetFileCreationAstroTime
Post by: Josť Roca on May 11, 2019, 04:56:20 PM
If there aren't new versions of PB, I have no incentives to continue working with it. I'm retired, so programming has become a hobby.