Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String Convert Time 1

Status
Not open for further replies.

soushi01

Technical User
Joined
Dec 27, 2010
Messages
31
Location
MY
Hi,

How to let String convert to Time like this

"090204 AM" convert to this--> 09:02:04 AM
"234534 PM" convert to this--> 23:45:34 PM

thanks
Regards
s1


 
Just break it down and concatenate

@time
left(timefield, 2)&':'& mid(timefield,3, 2)&':'&mid(timefield,5, 2)&' '&right(timefield, 2)

Ian
 
Hi,

Im Newbie crystal report user,
may i know in crystal report hv this function (as i know in Java Programming function called "String Buffer: deleteCharAt ")

Means that "90204 AM" or "234534 PM" , i just want to remove "AM" or "PM" , so it my expected display the value "234534"


thanks

regards,
s1
 
There is no Crystal function.

You can create a custom function which does the above.

To show just the numbers

@time2
left(timefield, 6)

Ian
 
Hi, Ian

Very thank you so much for the help
Is works great , and thanks for the information :D


regards,
s1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top