Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
D Format analogue for the datetime field
Message
De
15/12/2005 16:33:13
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01078457
Message ID:
01078471
Vues:
18
>Hi everybody,
>
>I think there is no solution for the problem I'll describe bellow but here it goes anyway.
>
>I have a special textbox class called txtDate. This class has the following code in its Init:
>
>if not dodefault()
>	return .f.
>endif
>
>with this
>	if empty(.cControlSource)
>		.cControlSource = .controlsource
>	endif
>
>	if empty(.cControlSource)
>		if .lDateTime
>			.value = iif(.lCurrent,datetime(),{//::}) && Initialize with the current or empty datetime
>		else
>			.value = iif(.lCurrent,date(),{}) && Initialize with the current or empty date
>		endif
>	endif
>
>	if type('.ControlSource') = "C" or .lDateTime
>		do case
>		case .lDateTime OR type(.controlsource) = "T"
>			* we can not set format to R
>			.Format = "R"
>
>		otherwise
>			.format = "D"
>			.inputmask = ""
>		endcase
>	endif
>endwith
>
>
>I use StrictDataEntry property as 0 - Loose and InputMask as =strtran(CHRTRAN(TRANSFORM(DATETIME()),"1234567890","9999999999"),"P","A")
>

With a datetime/date value VFP It doesn't accept an inputmask.


>The problem is when I want to use this control for time dataentry. The separators don't stay put...
>
>Any way to solve the problem? I really need a "T" format which would be the same as "D" for datetime.
>
>Thanks in advance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform