In Lotusscript the day and month value below the 10 has 1 characterposition (1 instead of 01)

I have a multivalue date field on a document that has the following content:

23-12-2009 00:00:00 CET

05-08-2009 00:00:00 CEDT

03-08-2009 00:00:00 CEDT

31-07-2009 00:00:00 CEDT

30-07-2009 00:00:00 CEDT

29-07-2009 00:00:00 CEDT

23-07-2009 00:00:00 CEDT

03-07-2009 00:00:00 CEDT

02-07-2009 00:00:00 CEDT

18-02-2009 00:00:00 CET

16-02-2009 00:00:00 CET

If I debug my lotusscript code and look at the content of this item in the debugger it looks like this:

23-12-2009

5-8-2009

3-8-2009

31-7-2009

30-7-2009

29-7-2009

23-7-2009

3-7-2009

2-7-2009

18-2-2009

16-2-2009

In other words the day and month value below the 10 has 2 charcterpositions on the documentproperties. But in lotussctipt the day and month value below the 10 has 1 characterposition.

How can I prevent this to happen in Lotusscript?

Regards

Subject: In Lotusscript the day and month value below the 10 has 1 characterposition (1 instead of 01)

You are mistaken. The day and month value display with one position, but that is a display setting that has nothing to do with the data.If you convert the data to text using the Format function you can choose the display:

Format( datefield, “dd-mm-yyyy” )

Subject: RE: In Lotusscript the day and month value below the 10 has 1 characterposition (1 instead of 01)

Hi

I tried to format the multivalue date field like you said. But the when the code get to the line where to debug the field I get a Type mismatch error.

Here is the code I have to format the multivalue date field:

Dim VacDateArray As Variant

VacDateArray = Format( doc.VacationDate, “dd-mm-yyyy” )

Subject: RE: In Lotusscript the day and month value below the 10 has 1 characterposition (1 instead of 01)

It doesn’t matter that the debugger displays the value differently than the document properties.

Date fields don’t store formatting information, so the same date value might be displayed differently in different situations (or for different users). What problem does this cause you?

The reason for the Type Mismatch error, is that the Format function does not accept an array as argument. But there’s no need to convert the date to text here (at least, not that you have told us about).

Working with Date/Time Values in Lotus Notes