I would like to get the exact creation date of the document.
I have a computed when composed field on the form with the following value @Created. With this, I get an output of 1/3 of the documents with the correct/exact creation date and the rest of the documents with irrelevant dates.
I tried to put another computed when composed field with the following value
@If(@Day(@Now) < 10; “0” + @Text(@Day(@Now)); @Text(@Day(@Now))) + “/” +
@If(@Month(@Now)<10; “0”+@Text(@Month(@Now)); @Text(@Month(@Now))) + “/” +
@Text(@Year(@Now))
which again has similar output like the other field, i.e. with only 1/3 of the documents having the correct creation date, the others with various irrelevant dates (different from the field with the @created value).
1/ Why is this inconsistency happening?
2/ How can I get the exact creation date of the document?
Thanks in advance for your assistance.
Subject: Get exact creation date of a document
Why would you want to store a date value as text? This is not a good idea, and not a good practise, you’re just creating issues for developers in the future.
Are you getting inconsistent results in documents that already existed before you added this formula? You just want to use a “Computed for display” field, and @created instead of @now.
Also if you do use @now, best to assign a temp value to @now at the beginning of the formula and use the temp value throughout.
Subject: RE: Get exact creation date of a document
Thank you very much for your reply and for our valuable help.
Yes, I’m getting the inconsistent results in documents that already existed before I added the formula. I changed it with the one you suggested and still, the same thing is happening. Is there a way to get the “initial”/“exact” creation date?
Thanks in advance.
Subject: @created returns the creation date of the document
You don’t say exactly what your inconsistency is.
Taken from Domino Designer Help
@Created
Return value
dateCreated
Time-date. The date when the current document was created.
Usage
@Created differs from @Now, in that @Created returns a time-date value that remains constant, while @Now returns a dynamic time-date that changes with each formula evaluation when it is used in a computed field.
Subject: RE: @created returns the creation date of the document
Sorry about that. I created a view with 2 columns, one with the pre-defined simple function “Creation Date” and one with the field value of the form (@Created). In some cases, the column with the pre-defined simple function shows the exact creation date of the document e.g. 29/7/2003, and on the contrary, the other column (field value) shows a total irrelevant date e.g. 21/6/2003.
In other cases, its the opposite, the column with the field value shows the exact creation date and the pre-defined one an irrelevant date.
From 2000 docs, only 50 the two column values match, show the same date, the exact creation date.
Subject: RE: @created returns the creation date of the document
Is your view column still using @now?
You started off by saying computed for display, they obviously don’t exist in view columns.
If you look at the document properties for a document showing strange results what does it show for the creation date?
How were the documents created?
Did they come in from a replica? Maybe from a machine that had the incorrect date/time?
@created has been in since Notes V1, it doesn’t have any known bugs.
Subject: RE: @created returns the creation date of the document
Nana, Carl really gave you all the information you need. Everything will work if you follow his advice closely. Maybe one more note to make it perfectly clear:
Domino does already store the creation date of each document without you having to program anything. The date is saved inside the document and @Created is the function to retrieve this system generated date-time-value.
Adding a “computed when composed” field to a form does NOTHING for documents that already existed before the field was added. As Carl suggested, use the properties window for the documents in question to see what the system generated Created date is (first tab) and which fields are actually stored in the document (second tab). New “computed when composed” field are NOT part of the document, unless the document is actively saved. Once the document has been saved after adding the new field, it will contain the correct value, if you use @Created.
Still there is usually no need to add such a field yourself. You can use @Created in view column formulas directly. For display on the form you can use a “computed for display” field or computed text (computed value). The only exception to this rule could be complex and/or distributed workflow applications where the content of existing documents might be copied to new documents which are then saved. Such application logic should be strictly avoided, if possible. Even if documents are replicated from other servers in a distributed environment, @Created will still return the date on which the document was originally created in the original database.
Also date-time values can be formatted for display in any way you like, so there is no advantage in storing them as text (but there are many disadvantages). In a view column you can use the column properties to chose from different display formatting options. In a computed for display field (or computed text) you can use @Text to format the date as needed.
I hope this did not add further confusion but made the point more clear. 
Subject: RE: @created returns the creation date of the document
Thank you Harkpabst and Carl for all your help. It is now more clear in my mind!