5 Replies Latest reply: Jun 4, 2014 3:04 PM by Steve Lord RSS

    script expression to pull time out of this file name?

    Steve Lord

      Hi, I have some left(right() functions pulling dates out of this filename format without issue, but am having trouble hitting the trick for the time hh:mm part of it.


      File name is like this:




      where the 00-48 is 12:48 am from a machine stamping this with 24-hour timestamps.  I don't really care how the time is formatted, I just need to distinguish the abc123_...00-48 file from the ...19-50 file that came through on the same day for some reason.  (We should only be getting one file per day, but for some reason an extra one shows up, and they conflict and null each other if on the same day and data in other fields overlap.)


      offhand, left(right(Filename(),10),2) should get the hours, and 7),2) should get the minutes, but concatenating around a &':'& isn't working and various other approaches resist.


      Simplest expression I've tried that's not working

           NUM(left(Right(Filename(),10),2))&':'&NUM(left(Right(Filename(),7),2)) as FileTime,


      I get no error messages until a load from the qvd this is stored in stops and says field not found - FileTime.


      Any help is appreciated, thanks!