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

  • Home
  • SEARCH
  • 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 8316847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:27:01+00:00 2026-06-08T21:27:01+00:00

I have a computed field with the following formula. var time = ; if(@IsNewDoc()==1)

  • 0

I have a computed field with the following formula.

var time = "";
if(@IsNewDoc()==1) time = @Now();
else time = @Text(@GetField("FormCreated"));
return time;

The only wy I could get this to work is to wrap the @GetField(“FormCreated”) with @Text. The computed field is set as DateTime and FormCreated is an actual date/time value in the document.

Why does @Now not need @Text?

  • 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-08T21:27:02+00:00Added an answer on June 8, 2026 at 9:27 pm

    When you use @GetField you will get a NotesDateTime and @Now returns a java date.
    try this code

    var time = "";
    if(@IsNewDoc()==1){
     time = @Now();
    }else{
    var time2:NotesDateTime = @GetField("FormCreated")[0];
    time=time2.toJavaDate();
    }
    return time;
    

    Updated the code and added [0] at the end of the @GetField row to get the first entry from the returned vector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have the following snippet to get focus on a particular text field in
I have a computed column created with the following line: alter table tbPedidos add
I have a const int that is computed at compile time in my Managed
I am trying to return a computed element with a computed attribute. I have
I have a computed field, whose format is specified as follows - #,##0.00;[RED](#,##0.00);# By
I am using a popular module called Computed Field in Drupal. I have used
I have the following simple entity: public class Something{ [DatabaseGenerated(DatabaseGeneratedOption.Computed)] public int ID {
I have one field called field_domain I have a computed field called field_graph field_domain
I have an immutable class whose only field is a bool[] (size determined at
I have an application in lotus domino with a field UNIDID -number(computed)... I want

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.