Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Xbase Fox > Re: Latest File...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 5 Topic 769 of 861
Post > Topic >>

Re: Latest File Modification Date

by "Stefan Wuebbe" <stefan.wuebbe@[EMAIL PROTECTED] > May 18, 2007 at 08:41 AM

Can you use FDate()?


hth
-Stefan



"Gene Wirchenko" <genew@[EMAIL PROTECTED]
> schrieb im Newsbeitrag 
news:p5cp439ep4vd2tcnorihg2l8fv3d0j4im8@[EMAIL PROTECTED]
>     I am updating my app loader program.  One of the things that I
> need to determine is the executable with the latest date (in the
> directory entry).  This is surprisingly awkward, because adir()
> returns date and time separately, and asort() sorts one column.
> Perhaps, I am missing a more suitable function.
>
>     Approach 1:
>          adir() to get the candidate filenames
>          asort() by date descending
>          find last element in array with latest date
>          asort() by time descending elements with latest date
>          return first filename in array
>
>     Approach 2:
>          adir() to get the candidate filenames
>          create cursor
>          append cursor from array
>          select max(dtos(dirdate)+dirtime) as maxwhen from cursor
>          select * from cursor where dtos(dirdate)+dirtime=maxwhen
>           into cursor2
>          return first filename in cursor2 (Ideally, there is only 1.)
>
>     Ha!  And I thought that the SQL approach would be shorter.
>
> Sincerely,
>
> Gene Wirchenko
>
> Computerese Irregular Verb Conjugation:
>     I have preferences.
>     You have biases.
>     He/She has prejudices.


-- 
 |\_/| ------ ProLib - programmers liberty -----------------
 (.. ) Our MVPs and MCPs make the Fox run....
  - /  See us at www.prolib.de or www.AFPages.de
 -----------------------------------------------------------
 




 5 Posts in Topic:
Latest File Modification Date
Gene Wirchenko <genew@  2007-05-17 13:21:06 
Re: Latest File Modification Date
Gene Wirchenko <genew@  2007-05-17 17:48:15 
Re: Latest File Modification Date
Man-wai Chang <toylet.  2007-05-18 10:09:20 
Re: Latest File Modification Date
"Stefan Wuebbe"  2007-05-18 08:41:55 
Re: Latest File Modification Date
Bernhard Sander <fuchs  2007-05-18 11:23:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 21:37:36 CDT 2008.