Answered

Document templates - Mapping - Date time datafields

Hey, i´ve got a problem in relation to mapping a document template.
After generating the document on the work portal all fields with the type "date-time" are displaying the date (what i want) and the time like 00:00:00 (what i dont want). --> screenshot
It is possible to show just the date without the time?


THX

Comments (2)

photo
1

Any idea?

photo
1

Dear Dimitry,

In order to add the correct date, you need to create a new date, then it must be passed to String Value. Example:

  1. NewDate=new DateTime(SaleDate.Year,SaleDate.Month,SaleDate.Day);
  2. <process.stringValue>= NewDate.ToString();

Then, you need to map the stringValue to your document.

Another way is to include the format into the ToString method. For further information: https://msdn.microsoft.com/en-us/library/zdtaw1bw(v=vs.110).aspx

Regards