dates as text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got two fields containing admission and discharge dates, and I need to
calculate the length of the stay but the dates are text fields.

I'm guessing I need to use calculated fields, but I'm a complete beginner at
them. Would it be three calculated fields, two converting the text dates to
date format, and then another calculating the difference between the two?

What would the Expr: syntax be?

Thanks.
 
Josie said:
I've got two fields containing admission and discharge dates, and I
need to calculate the length of the stay but the dates are text
fields.

I'm guessing I need to use calculated fields, but I'm a complete
beginner at them. Would it be three calculated fields, two converting
the text dates to date format, and then another calculating the
difference between the two?

What would the Expr: syntax be?

Thanks.

Could you post the example of the data? You need to change the text
field to a date type, but we need to see what you have before anyone can
suggest how to do that.

eg Jan 1 2001 January 1, 2001 January 1 2001 1/1/2001 1/1/02 Jan 1, 02
etc.
 
I've got two fields containing admission and discharge dates, and I need to
calculate the length of the stay but the dates are text fields.

I'm guessing I need to use calculated fields, but I'm a complete beginner at
them. Would it be three calculated fields, two converting the text dates to
date format, and then another calculating the difference between the two?

What would the Expr: syntax be?

No way to guess, not knowing the format of the fields.

Hazarding a wild guess,

DateDiff("d", CDate([admission]), CDate([discharge]))

might be worth a try.

Any reason why you're storing date information in a text field???

John W. Vinson[MVP]
 
Back
Top