How to change the date format from 11/20/2007 to Nov 20, 2007 in script

Hi EveryoneI want to update the richtextfeild History field with date format from 11/20/2007 to Nov 20, 2007 .

I will appreciate for all help.

Thanks

Lisa

Subject: How to change the date format from 11/20/2007 to Nov 20, 2007 in script.

Don’t know what your richtextfield history might be, but for displaying dates in a specific format, have a look at the Format$ LotusScript function.

@Text provides similar functionality for @Formulas.

Subject: RE: How to change the date format from 11/20/2007 to Nov 20, 2007 in script.

Function FormatDate (dtOriginal As String) As String%REM

FormatDate Function

Takes a NotesDateTime variable and converts and returnsthe date to the format

dd mmm yyyy

%END REM

Dim intDay As String

Dim intMonthNo As String

Dim strMonthName

Dim intYear As String

'Get the day

intDay = Day(dtOriginal)

'Get the month and work out the appropriate 3 letter text version

intMonthNo = Month(dtOriginal)

Select Case intMonthNo

Case 1 : strMonthName = “Jan”

Case 2 : strMonthName = “Feb”

Case 3: strMonthName = “Mar”

Case 4: strMonthName = “Apr”

Case 5 : strMonthName = “May”

Case 6 : strMonthName = “Jun”

Case 7 : strMonthName = “Jul”

Case 8 : strMonthName = “Aug”

Case 9 : strMonthName = “Sep”

Case 10 : strMonthName = “Oct”

Case 11 : strMonthName = “Nov”

Case 12 : strMonthName = “Dec”

End Select

'Get the year

intYear = Year(dtOriginal)

'Finally put the all together

FormatDate =strMonthName & " " & Cstr(intDay) & " " & " ," & Cstr(intYear)

End Function

Subject: RE: How to change the date format from 11/20/2007 to Nov 20, 2007 in script.

What’s so wrong with

dateOutString = Format$(dateIn, “mmm d, yyyy”)

Subject: Thanks Harkpabst and DominoGuru for help. It’s work like charm.

ThanksLisa