dates as text

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.
 
J

Joseph Meehan

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.
 
J

John Vinson

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

convert text to date 1
DateDiff on blank fields? 4
When return is over 24 hours. 10
Calculating time in days 2
Excel Microsoft excel interest formula 2
Unique dates 6
Duplicates on a report 11
Converting Text to Date 1

Top