Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date only format
Message
De
08/04/2003 08:11:21
 
 
À
07/04/2003 23:29:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00774834
Message ID:
00775033
Vues:
15
I suppose when you think of it in those terms, it sort of makes sense. Of course, I also suppose that then all the combinations should be possible - only show Time without date etc.

I guess it depends on the purpose for which it's needed.

Alan

>YOu can turn of whether a VFP textbox displays the seconds, why not the full time. I think it is a little different. But, as you say, I will 'deal' with it.
>
>>I'm guessing that they expected that the user input controls would reflect the data as it is. I don't see that what you're suggesting is really any different than saying that there should be a simple way to set a textbox controlsource to only deal with the 1st (or middle, or whatever) 5 characters of a 15 character field. I doubt it comes up much, and when it does, we just have to improvise.
>>
>>Alan
>>
>>>Yep, that's basically what I am going to do. I can't belive there is no way to set a text box to only display/edit the date portion of a date time field. I guess cause VFP has a date type they never thought this was needed.
>>>
>>>>I doubt you can do it directly. You can put code in the refresh to:
>>>>
This.Value = TTOD(Table.field)
>>>>and then in the valid, or wherever works best for you,
>>>>
>>>>Local llOk
>>>>llOk = .T.
>>>>IF !EMPTY(DTOC(this.Value))   && valid date?
>>>>   IF this.Value <> TTOD(table.field)   && changed?
>>>>      replace table.field WITH DTOT(this.Value)
>>>>   Endif
>>>>Else
>>>>   llOk = .F.
>>>>   MessageBox('Invalid date')
>>>>ENDIF
>>>>
>>>>Return llOk
>>>>
>>>>
>>>>>Does anyone know if it is possible to limit a textbox to only display and allow editing of the date portion of a datatime field?
>>>>>
>>>>>Thanks, BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform