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)))
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)))