Lotusscript date function

Hi,

Just wanna ask how can I get the date ONLY value of a date-time field or variable and still use it a date? Because currently, it’s either I can retrieve the date only value but in a string data type or retrieve the date plus the time.

Thanks a lot.

Subject: Lotusscript date function

Depends what you are trying to do

See NotesHelp on NotesDateTime.DateOnly

or

use the Format function eg

Format(doc.YourDateField(0), “dd/mm/yyyy”)

Subject: RE: Lotusscript date function

guess i’m giving a late reply here, but i think i’ve just met the same problem:Wanting to set a date/time-field to just contain the date value and doing this using Lotus script.

The problem with dateonly and format is that they return text values so the date/time field becomes text

The CDat() function will add the time element. I’ve tried to combine these functions - but no success.

Anyone?

Subject: RE: Lotusscript date function

Use a NotesDateTime object. If you use the .SetAnyTime method against it, the time component is removed, leaving only a date (like using @Date in Formula Language). Similarly, using .SetAnyDate removes the date component,leaving only the time.