>thank boris,
>
>if we have not "./-" in the string because somedate was Created with dtoc( somedate , 1 ) ?
The you will get the same string back:-)
Try it;
WAIT WINDOW CHRTRAN(DTOC(DATE(),1),"./-","")
>
>
>
>>But how:
>>even this:
>>01.01.2011 00:00:00
>>is a VALID datetime.
>>You can't check the value of any of the time portion, because zero is valid.
>>Maybe you could check the length of the string and if it is bigger that 8 (10 if you have separators) then it is T else D
>>
>>Something like:
>>
>>IF LEN(CHRTRAN(A,"./-","")) < 9
>> ? "D"
>>ELSE
>> ? "T"
>>ENDIF
>>
>>
>>
>>>hi Naomi,
>>>
>>>
>>>i serach something as :
>>>
>>>
>>>a = somedate
>>>
>>>
>>>if MINUTE( CTOT( TTOC(A))) > 0
>>>return 'T'
>>>else
>>>return 'D'
>>>endif
>>>
>>>
>>>
>>>
>>>
>>>>You need to use ttoc for the datetime value.
>>>>Do you now want to find out the type of the string variable depending on
>>>>'20110114'
>>>>
>>>>vs.
>>>>
>>>>'20110114092723'
>>>>?
>>>>
>>>>>sorry for my poor english....
>>>>>
>>>>>first sample
>>>>>
>>>>>a = dtoc( datetime() , 1 )
>>>>>
>>>>>? something() return 'T'
>>>>>
>>>>>
>>>>>second sample
>>>>>
>>>>>a = dtoc( date() , 1 )
>>>>>
>>>>>? something() return 'D'
>>>>>
>>>>>
>>>>>
>>>>>>Bernhart,
>>>>>>
>>>>>>maybe I have a bad day, but I don't understand what you want.
>>>>>>
>>>>>>>hi all,
>>>>>>>
>>>>>>>a = dtoc( datetime() , 1 ) OR a = dtoc( date() , 1 )
>>>>>>>
>>>>>>>I want a formule that give "T" or "D" when i type A
>>>>>>>
>>>>>>>how can i have this ?
>>>>>>>
>>>>>>>
>>>>>>>thank in advance
>>>>>>>
>>>>>>>bernhart
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.