Skip to main content
Nintex Community Menu Bar

Formatting DateTime fields to remove time

  • June 15, 2016
  • 7 replies
  • 353 views
  • Translate

Forum|alt.badge.img+9

Hi

 

During testing,  muy Users have noticed the following formats for  Date Time fields in the body of the Assign Task email

 

 

START DATE    15/06/2016 00:00:00

END DATE    16/06/2016 00:00:00

 

Is there a quick way to change this  other than editing the generated HTML

 

<td style="color:#444444;font-family:Segoe UI Light,sans-serif;font-size:11pt;vertical-align:top;">‎‏<span contenteditable="false" data-nintextoken="true" style="display:inline-block;"><a class="ms-rtestate-write draggableToken" contenteditable="false" href="href="#"" link="false" onclick="return false;" reftext="nw-stringbuilder-token-1e1b82db-b7df-4186-a943-a0fa0f2fe66e" spellcheck="false" style="color:red;text-decoration:none;cursor:pointer !important;"><span data-nintextoken="true">{Current Item:Start Date}</span></a></span>‌</td>

 

oh and before somebody asks, this the current column settings!

 

Start Date Collumn settings.PNG

 

Daniel

Did this topic help you find an answer to your question?

7 replies

bamaeric
Forum|alt.badge.img+13
  • Apprentice
  • 464 replies
  • June 16, 2016

Hi Daniel,

Try using a Regular Expression with the following settings:

  • String = Start Date field
  • String operation = Replace
  • Pattern = [0-9]+:[0-9]+:[0-9]+ [a-zA-Z]+
  • Replacement string = empty
  • Output = Text variable

Then use the text variable in your task email.

Translate

Forum|alt.badge.img+11
  • Scholar
  • 113 replies
  • June 16, 2016

I would recommend creating text Workflow Variables "Start" and "End", and then setting these variables just before the task in your workflow using Set Workflow Variable and setting Start to the date format you wish by pressing on the orange fx button to pull-up the return type selection box:

SelectDateFormat.PNG

You can then replace Start Date with the Workflow Variable "Start" in your email layout.

Translate

Forum|alt.badge.img+9

Shaun  /  Eric

I will look at your suggestions when I get in tomorrow. I think one of the team has made a change by setting string variables from both the Start and End dates with just the first 10 characters, and then using these vars in the email.  I wondered if there wasn't a way without creating yet more variables.

Oh well, I will update this post once I have tested .

Thanks again.

Daniel

Translate

Forum|alt.badge.img+9

Eric

Although, the workflow is pretty much completed. I thought I would tryout your suggestion on one of the .NET regex tools out there using a text string: 20/06/2016 00:00:00

.NET Regex Tester - Regex Storm

Unfortunately, I am not seeing a match.  In my case I wouldn't use a regex expression in my workflow unless I got a match using one of the tools.

Daniel

Translate

bamaeric
Forum|alt.badge.img+13
  • Apprentice
  • 464 replies
  • June 27, 2016

Hi Daniel,

The correct Pattern should be:  [0-9]+:[0-9]+:[0-9]+

Give that a try and let me know if that works.

Eric

Translate

Forum|alt.badge.img+8
  • 73 replies
  • June 28, 2016

Hello Daniel,

where you able to solve your issue, whit the hints of shaunlub​ or @eric

Thank you, regards

Oliver

Translate

Forum|alt.badge.img+12
  • 852 replies
  • February 5, 2017

Hi Daniel, did the suggested fix solve your issue?

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings