Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a files with this name formats:
ab_cd_afd_2013311214304567
ab_afd_2013311214304567
etc.
Also, I have a variable containing a string with a file name disregarding the time stamp. (vFileName = 'ab_cd_afd')
I want to compare between them.
which function should I use?
Thanks,
Boris
Your timestamp is of fixed length, right?
Try
=left(Filename, len(Filename)-17)
edit: and to compare to your variable:
=if( left(Filename, len(Filename)-17) = vFileName, THENBRANCH, ELSEBRANCH)
Your timestamp is of fixed length, right?
Try
=left(Filename, len(Filename)-17)
edit: and to compare to your variable:
=if( left(Filename, len(Filename)-17) = vFileName, THENBRANCH, ELSEBRANCH)
What about the file extension?
Which file extension, can't see the extension in your above samples.
If you need to extract above filenames from a full path with extensions, have a look at your other current thread;-)
That one is talking about ignoring the folders and the extension.
here I asked how to ignore the time stamp which is with the file name itself.
and the extension is csv.
I guess just change the 17 to 21?
Yes, 21 should work for an extension '.csv' (four characters).