Data Conversion Expression returning an #Error

D

D. Stacy

Looking for some guidence on how to get this expression out sick bay!

The [Cut_Time] data field comes from a legacy system and may or may not have
data in it, may or may not be 0 thru 5 char in length, comes in formatted as
text data. The data represents a time stamp of an activity expressed in
military time.

The goal is to convert it to the DateTime format IF it has any entry at all;
IF blank just output a null.





CutT_temp:
CDate(IIf(IsError(FormatDateTime(IIf(Len([Cut_Time])<1,"",Left([Cut_Time],2)+":"+Right([Cut_Time],2)),0)),"",FormatDateTime(IIf(Len([Cut_Time])<1,"",Left([Cut_Time],2)+":"+Right([Cut_Time],2)),0)))
 

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

Top