Bill F
Bill F

Reputation: 2087

Setting a date in session.createDateTime to a specific d/t and time zone

I am trying to set a NotesDateTime object to a specific time GMT and have the following formula:

var blankDT:NotesDateTime = session.createDateTime("01/01/1970 0:0:0 AM GMT");

When I run this it returns a null date time. I have tried formating the date string as "1970:01:01:0:0:0 GMT"

When I look at the help in the designer it is pretty unhelpful.

Upvotes: 0

Views: 301

Answers (1)

Bill F
Bill F

Reputation: 2087

I was not extracting the correct portion of the resulting date. This works

var blankDT:NotesDateTime = session.createDateTime("1970/01/01 0:0:0 AM GMT");
viewScope.put("vsBlankDate",blankDT.getGMTTime());

Upvotes: 1

Related Questions