Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datetime conversion solution
Message
De
13/10/2005 12:32:28
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/10/2005 12:24:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01058733
Message ID:
01058748
Vues:
30
This message has been marked as the solution to the initial question of the thread.
>had made updates to my reply. What I still didn't clearly understood is what you store. If it's 45 ok 45 but what if say "01:30" or your spinner simply gets 'minutes'? Assuming the latter:
>
>lnBaseValue = 45
>ltStart = dtot(date())+m.lnBaseValue*60
>ltEnd = m.ltStart + 10 * 60
>between(datetime(), m.ltStart, m.ltEnd)
>
>
>Cetin,
>Im actually storing the whole time.. so for the 1245AM, i will get 45 and it the user set this to 135PM, i'd get 1335.

Oh makes sense, 24hr format. Then first version applies with slight modification:
lnStartInSeconds = Ctot(Transform(Padl(m.lnStoredValue,4,'0'),"@R 99:99")) - Ctot('0')
lnEndInSeconds = m.lnStartInSeconds + 10 * 60
lnNowInSeconds = Datetime() - dtot(date())
? Between(m.lnNowInSeconds, m.lnStartInSeconds, m.lnEndInSeconds)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform