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

DateValue 1

Status
Not open for further replies.

TechUser23

IS-IT--Management
Mar 8, 2007
28
US
I still relatively new to Crystal. I need to convert a string field into datetime so I can format it accordingly.

My issue is I found another instance with a formula being used and now my Date (07/14/2006) is reporting back 07/09/2006.

Code:
DateValue (Left ({Data.Date},19 ))

Can anyone help shed light on this for me? What does the "19" mean to me and are there more #'s to look at?
 
You need to post what the string format of your date is, we don't know what it's storedlike, and you should include your Crystal version and the database.

As for the 19 in the above, that means the first 19 characters starting from the left.

-k
 
Maybe this would be easier:

Currently its displaying as such:

2006/07/14 00:00:00.00

I want to read:

07/14/2006
 
From what I can tell, you can use:

date(val(split({table.string},"/")[1]),val(split({table.string},"/")[2]),val(split(left({table.string},10),"/")[3]))

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top