on 11-06-2007 10:15 PM
Post Author: llcoolt
CA Forum: Formula
Hey all!
I have a string field "UDWARHOUSE.WELCOMELETTER" that is used for dates. In order to bring it into my report with a date I used this formula, called "DateLetter":
DateValue ({UDWARHOUSE.WELCOMELETTER})
Works fine until I want to determine the number of days between the string field "UDWARHOUSE.WELCOMELETTER" and a date field "HOUSEMASTER.SETTLEMENT_DATE".
I wrote this formula to accomplish the task:
({@DateLetter}) - {HOUSEMASTER.SETTLEMENT_DATE}
It seems to work fine and returns the day expected until I refresh the report.
Any thoughts on where I'm going wrong?
Post Author: V361
CA Forum: Formula
Try CDATE
Examples
The following examples are applicable to both Basic and Crystal syntax:
CDate ("Dec. 31, 1999")
Returns the Date value for Dec. 31, 1999.
CDate (50)
Returns the Date value for February 18, 1900.
CDate (#Oct. 20, 1999 12:02pm#)
Returns the Date value for October 20, 1999.
CDate (1930, 7, 30)
Returns the Date value for July 30, 1930.
Comments
You can use the IsDate function to check if a String argument can be converted to a Date before doing the actual conversion. That way, if the conversion cannot be done, you can handle the situation appropriately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.