Format field

Normally when i want to convert a date field value from dd/mm/yyyy to mm/dd/yyyy i use format$(fieldname,“mm/dd/yyyy”).Now i want to put this on the field translation event, but that even only allow formula.Can formula do the samething ?

Subject: Format field

Instead of the Input Translation event, why don’t you use the Exiting event for the field? Then you could use LotusScript.

Ken

Subject: Format field

You’ll have to do this the hard way. Assuming this is a text field, the simplest method would be:

@Text(@Month(datefield)) + “/” + @Text(@Day(datefield)) + “/” + @Text(@Year(datefield))

If you want the leading zeroes in there, then you’ll have to create temporary variables and code conditions to build the 2 character month and day. Something like this:

MonthChar := @If(@Month(datefield) < 10; “0” + @Text(@Month(datefield)); @Text(@Month(datefield)))

And then concatenate the variables together.

Hope that helps.