Skip to main content

I have a pretty straightforward form that is inserting DateTime variables from a SharePoint list but whenever they print to email, the data always includes the time as well as the date - which is not something that was included, so it always shows up as “12:00:00 AM”. Ideally, I’d like to format that out - but so far I havent found a way to do that. 

For example my Input would be:


and the output is:
 

 

SharePoint settings are as follows:
 

 

 

Hi @Iramos85 

You can select the return type for the Datetime as either Long Date or Short Date to omit out the time.

 


Another option is to use a Regular Expression action to remove everything after the date.

Here is how to do that:

  1. Add a Regular Expression action to the workflow.
  2. Configure this action with these settings:
     - String = Date of Request
     - String operation = Replace
     - Pattern = \s0-9]+:90-9]+:90-9]+.{3}$
     - Replacement string = Leave empty
     - Output = txtDateOnly  (this is a text workflow variable that you create)
  3. This returns only the date with the time, AM/PM, and spaces removed.
  4. You can then use this text workflow variable in your email.

 


Reply