371 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Forum | Blogs | Search | myPL | About 
 
May 24, 2012, 12:52:17 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Customize Date Format In Views  (Read 655 times)
0 Members and 2 Guests are viewing this topic.
nur_afini
Newbie
*
Offline Offline

Posts: 11


View Profile
« on: May 16, 2010, 07:38:08 PM »

How do I make sure that all the date in Views is in the same format. I had some problem with this thing. As when I use LotusScript, I have to declare the field as String and not Date. This is because, I do not know the LotusScript syntax for @Now. I used this code when I declare the date as String "Call uidoc.FieldSetText("DtSubComm", Cstr(Now()))". But when I change the field to Date instead of String, I change the formula to be like this, "Call uidoc.FieldSetText("DtSubComm", Now())", but there is an error msg being prompt out.
Logged
TexasSwede
Newbie
*
Offline Offline

Posts: 10


View Profile
« Reply #1 on: May 19, 2010, 08:42:24 AM »

What I always do if I have to write a date into a Date field is to perform a uidoc.Refresh() afterwards.
But when you work in the UI classes/front-end, the save should handle the data conversion.
FieldSetText takes a string as it's second argument, so yo have to pass it a string, or you get the error you are seeing.

Always try to store dates in Date fields, not as text.


Logged
cubert
Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #2 on: May 25, 2010, 02:11:27 PM »

Dim uiws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument

Set uidoc = uiws.CurrentDocument
Set doc = uidoc.Document

Call doc.ReplaceItemValue("datefield", Now)
Logged
nur_afini
Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #3 on: May 26, 2010, 09:07:55 PM »

Thank you so much for your kind reply...  Wink
Logged
nur_afini
Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #4 on: June 18, 2010, 02:16:59 AM »

The code given works well in my application. THANK YOU SOOOO MUCH  Wink
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!