Customise DateTime display in report output

  • Hi,

    I am trying to return the date portion of a DateTime output field on my report. For example, I want to display '30/03/2010' from the SQL value of '30/03/2010 12:00:00 AM'

    and

    display '5/2/2010' from the SQL value of '5/2/2010 12:00:00 AM'

    I originally tried

    =Mid(Fields!FieldName.Value, 1, Instr(1, Fields!FieldName.Value, " ",1))

    but this returns blank values.

    Then I tried to ascertain the asc character but it returns #Error where the white space is.

    Does this mean that this is NOT a white space (maybe a tab instead)? How do I resolve this issue?

    Any ideas please?

    Thanks in advance,

  • Try this as an expression

    =FormatDateTime(YourDateValueHere,DateFormat.ShortDate)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply