If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Data Conversion Expression returning an #Error
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))) |
Thread Tools | |
Display Modes | |
|
|