G Guest Feb 18, 2006 #1 What is the most efficient way to convert a text string in the form of 20060218 to a short date? Thanks!
What is the most efficient way to convert a text string in the form of 20060218 to a short date? Thanks!
G Guest Feb 18, 2006 #2 Assuming that the field always have the same formt yyyymmdd Try cvdate(format(FieldName,"####/##/##"))
Assuming that the field always have the same formt yyyymmdd Try cvdate(format(FieldName,"####/##/##"))
M Marshall Barton Feb 18, 2006 #3 AllyOop said: What is the most efficient way to convert a text string in the form of 20060218 to a short date? Thanks! Click to expand... Short date is a format, which is irrelevant to the value. To get a date value from that kind of string: DateSerial(Left(txtstr,4), Mid(txtstr, 5,2), Right(txtstr,2) To format the date value set the Format property of the text box that you're using to display the value.
AllyOop said: What is the most efficient way to convert a text string in the form of 20060218 to a short date? Thanks! Click to expand... Short date is a format, which is irrelevant to the value. To get a date value from that kind of string: DateSerial(Left(txtstr,4), Mid(txtstr, 5,2), Right(txtstr,2) To format the date value set the Format property of the text box that you're using to display the value.
G Guest Feb 18, 2006 #4 Thank you! Ofer said: Assuming that the field always have the same formt yyyymmdd Try cvdate(format(FieldName,"####/##/##")) Click to expand...
Thank you! Ofer said: Assuming that the field always have the same formt yyyymmdd Try cvdate(format(FieldName,"####/##/##")) Click to expand...