Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Date/Time Field

Status
Not open for further replies.

renato1970

Technical User
Mar 26, 2002
4
CH
Hello

I've made the following function:

if {VBasicDocInd.Status} = "Accepted" then
formula = CDateTime({VBasicDocInd.StatusChanged})
else
formula = CDateTime(0,0,0,0,0,0)
end if

If the statement is not true, I get '00:00:00' in the field but I want an empty field. Only the date is suppressed but not the time.
What do I have to do to get a totally empty field?
Thanks for your help.
Renato
 
The thing is that unlike the date, 00:00:00 is a real time. Either convert the datetime field to a date field in the formula when {VBasicDocInd.Status} <> &quot;Accepted&quot;, or apply a conditional suppression on the field to be applied when the time equals midnight and no seconds.

Naith
 
Thanks

I changed the formula like this and that's it:

if {VBasicDocInd.Status} = &quot;Accepted&quot; then
formula = CStr(CDateTime({VBasicDocInd.StatusChanged}),&quot;dd. MMMM yyyy HH:mm&quot;)
else
formula = &quot;&quot;
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top