urbanmojo
urbanmojo

Reputation: 757

Leading blank space converting date to string in Crystal Reports

I have this formula in Crystal:

totext({eCSRStat.ContactOriginatedStamp},"M/d/yyyy")

The date is coming out formatted like 8/ 8/2014, with an extra space before the day. I imagine this has to be a bug. I am using Crystal Reports 2008 version 12.4.0.966. Any way to work around this blank space before the day?

Upvotes: 0

Views: 1022

Answers (2)

gedare
gedare

Reputation: 126

Using "M/dd/yyyy" should replace the space you get with a leading 0 instead.

Upvotes: 1

urbanmojo
urbanmojo

Reputation: 757

Should have thought of this, pretty easy fix:

replace(totext({eCSRStat.ContactOriginatedStamp},"M/d/yyyy")," ", "")

Upvotes: 2

Related Questions