Hemant Kumar
Hemant Kumar

Reputation: 4611

How can we conver the String to Time format in Crystal Report?

I have a report which the DB is access.Now we migrated that report and DB is SQL SERVER.we have a field seltime where the sql server data type is "time".But when report is migrated we got the formula field for seltime is String.

we have some calculation in formula field it is throwing an error when we try to show that in 24 format.

Why the 'time' data type is converted to string in report? If so ,how to convert the string to 24 format in report formaule field? The value we are getting here is '10:50:00.0000'.

Upvotes: 0

Views: 4579

Answers (1)

Hemant Kumar
Hemant Kumar

Reputation: 4611

After a lot of R D I found a Solution for my Question.

CStr(Time(Left ({interview.seltime},5)), "h:mm tt", "AM", "PM") + "  " + Cstr(date({interview.seltime}),"dddd d MMMM, yyyy")

Upvotes: 2

Related Questions