Wednesday, 15 January 2014

datetime - How do I format time in SSRS to HH:MM AM/PM format? -



datetime - How do I format time in SSRS to HH:MM AM/PM format? -

i tasked augmenting next code display time without seconds, , am/pm:

=iif(fields!new_date.value <> "no change", formatdatetime(iif(fields!new_date.value = "no change","1/1/12",fields!new_date.value),dateformat.shortdate), "") & iif(fields!new_time.value <> "no change",formatdatetime(iif(fields!new_time.value = "no change","00:00",fields!new_time.value),dateformat.shorttime), "")

in realizing formatdatetime insufficient trying do, found next did not work (just looking @ snippit relates time fields), :

format(iif(fields!new_time.value = "no change","00:00",fields!new_time.value),"hh:mm tt")

or this

format(iif(fields!new_time.value = "no change","00:00",fields!new_time.value),"hh:mm tt")

i'm getting format codes here.

what doing wrong?

if info in simple textbox(or table cell) have easer solution.

right click on textbox > properties :

use following:

datetime reporting-services

No comments:

Post a Comment