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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting

Status
Not open for further replies.

jpillonel

Programmer
Dec 17, 2003
61
CH
Hello,

I work with Crystal Reports 9 on a MSSQL helpdesk database.

In one table: cr_prp I have field called: label

This field (label)is a VARCHAR(240) field.

Sometimes the end-user insert date like: DD/MM/YYYY HH:MM

How can I convert that to create some graphics and summarize operations ?


Thanks for your help !!!


jpillonel@yahoo.fr
 
Thanks for your answer.

But when I try with this:

if isdateitme({crprp.value}) then
cdate({crprpr.value})

I have this error message:

BAD DATE FORMAT STRING


Thanks
 
Does the string have other stuff besides date? You could try

if isdateitme(Left({crprp.value}, 16)) then
cdate(Left({crprp.value}, 16))

That's assuming it is the left-most characters. You could use Right({crprp.value}, 16)) if the date is right-aligned, etc.

Madawc Williams
East Anglia, Great Britain
 
Thanks for your help !


It's not a string field it's a VARCHAR(240) so it sould be blanks behind.


I try with left and right, I have the same error message.



What I like to do is to convert the varchar filed to a datetime.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top