Date format Type mismatch

Hi,

As per my script format is :

If docCurrent.ClaimTypeCode(0) = “Fb” Then

	If  Cdat(Format(Today,"dd/mm/yyyy")) > Cdat("31/01/"+Cstr(Year(Today)))  Then

		If Cdat(Format(Cdat(temp),"dd/mm/yyyy")) < Cdat("01/02/"+Cstr(Year(Today))) Then

			Set vForm = rfc.exports( "I_FORM" )

			vForm.value = "1"

		End If

	End If

End If

As my client’s system regional setting format is “mm/dd/yyyy” , through the agent I want to tell them a message the system format is “mm/dd/yyyy” so you pls change to dd/mm/yyyy from Regional settings/control panel , so how can we check the system date through agent and prompt a message.

Pls assist me asap.

Thanks

Subject: date format Type mismatch

Riyas , You may use the Notes international class at any event that you feel like …sample code is attached.

            Dim workspace As New notesuiworkspace

Dim session As New notessession

Dim uidoc As notesuidocument

Dim international As NotesInternational

Dim db As notesdatabase



Set db = session.currentdatabase

Set international = session.International



If international.IsDateMDY Then

	Messagebox "Please note that you have to change the date format of your computer to DD/MM/YYYY"

	Call Source.close

End If

Subject: RE: date format Type mismatch

Hi sidhardh, Thank you very much for ur nice help.

its working fine but i have one doupt, once the message prompting at post open. if i want to close the application afer click ok in message prompt what i will do?

pls assist me.

Thanks

Subject: RE: date format Type mismatch

the closing part will be taken care of by the line in the code …

Call Source.close

Pls look at the code once more …

If you want the code to work at database open , then you will have to write it at the database script part.

In designer , under Other → database resources → database script.

Write it under the post open event.

Subject: RE: date format Type mismatch

Really very much thanks to ur great help.

Its working now.

Thanks once again.

Regds,

Riyas

Subject: RE: date format Type mismatch

Hi,Thanks, your coding is very useful for me.

Pls guide me for given detail

My doupt:

How about terminating the application at first place moent it finds the date format not = dd/mm/yyyy?

pls assist where i have to put the code for application terminating.

Thanks

Regds

Subject: RE: date format Type mismatch

Hi sidhardh,

if i want to trigger the message when opening a application (not in view) where i have to put the code?

pls assist me.

Thanks

Subject: date format Type mismatch

Use the NotesInternational class