Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9174519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:46:06+00:00 2026-06-17T16:46:06+00:00

How do I compare @Now to a data / time value in a document?

  • 0

How do I compare @Now to a data / time value in a document? This is what I have

      var ProjectActiveTo:NotesDateTime = doc.getItemValueDateTimeArray("ProjectActiveTo")[0];

    var ProjectExpired;

    var d1:Date  = @Now();

    if (d1 > ProjectActiveTo.toJavaDate())      
    {
        dBar.info("Today: " + d1 + " > " + ProjectActiveTo.toJavaDate());
        ProjectExpired = true;
    }
    else
    {
        dBar.info("Today: " + d1 + " < " + ProjectActiveTo.toJavaDate());
        ProjectExpired = false;
    }   

But this always seems to return false. I printed out some diagnostic messages.

Today: 1/18/13 6:02 PM < 1/20/01 5:00 PM

Obviously today is greater than 1/20/01 but this is the result of my test. Why?

I have done some searching and saw that the compare member function might be used but it returns an error for me and compare is not in the intelisense (or whatever Lotus calls it) in the design editor.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:46:07+00:00Added an answer on June 17, 2026 at 4:46 pm

    Found this little snippet on line – it should point you in the right direction

    var doc:NotesDocument = varRowView.getDocument();
    var d:NotesDateTime = doc.getItemValue("BidDueDate")[0];
    var t:NotesDateTime = session.createDateTime("Today");
    if (d.timeDifference(t) > 0 ) {
    return "Overdue";
    }else{
    return "";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to compare a now long/date value minus a last notification time long/data
I have a date time that I generate like this: DateTime myDateTime = DateTime.Now;
I often have data where I want to compare the value of one level
I need to create a function to filter data according to time. I have
This is part of my query: WHERE WEEK( data.time ) = ( WEEK( CURRENT_DATE
I have a time series(a csv file) data that looks like below. Each observation
what I need is simple thing, I have string which cantains data - time
I have some locations ( in this case >3000 ) stored with Core Data.
This is part of a matlab intro course for biologists. I have my data
I have this table pageview id | visitor | id_realestate | time ----------------------------------------------- I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.