grumbachr Posted August 10, 2009 Posted August 10, 2009 Im not finding it but is there something to increment by letters? 1a 1b 1c kind of thing? TIA
comment Posted August 10, 2009 Posted August 10, 2009 (edited) To increment what? And what should happen after "1z"? Edited August 10, 2009 by Guest
grumbachr Posted August 10, 2009 Author Posted August 10, 2009 Sorry for not being clear but the chances are we will never get to E let alone Z. Its for a process thats done usually once a day but in the past 2 years maybe 25 times we done it twice in a day and 3 times in one day is even more rare. It is for a report and the letter will be appended to a date on record creation. So it would actually look more like. 08102009A 08102009B 08112009A 08122009A
comment Posted August 10, 2009 Posted August 10, 2009 I am still not sure how exactly is the 'increment' supposed to happen. Assuming you know how to get it to increment by numbers, e.g. 08102009 1 08102009 2 08112009 1 08122009 2 you can convert the numbers to letters simply by: Char ( 64 + number )
grumbachr Posted August 10, 2009 Author Posted August 10, 2009 This is the solution I've some up with to solve my needs. I doubt this is the best solution and I know someone will probably poke giant holes in my calc but so far its working for me and I've not been able to break it. Let ( [$Date=Year ( Get ( CurrentDate ) ) & SerialIncrement ( "00" ; Month ( Get ( CurrentDate ) ) )& SerialIncrement ( "00"; Day ( Get ( CurrentDate ) ) ) ; $count = If ( Count ( Manifest 2::zc_ManifestDate ) <1 or IsEmpty ( Count ( Manifest 2::zc_ManifestDate ) ) ; 1 ; Count ( Manifest 2::zc_ManifestDate )+1 )] ; Case ( $count =1 ; $Date & "A" ; $count =2 ; $Date &"B" ; $count =3 ; $Date &"C" ; $count =4 ; $Date &"D" ; $count =5 ; $Date &"E" ; $count =6 ; $Date &"F" ; $count =7 ; $Date &"G" ; $count =8 ; $Date &"H" ; $count =9 ; $Date &"I" ; $count =10 ; $Date &"J" ; $count =11 ; $Date &"K" ; $count =12 ; $Date &"L" ; $count =13 ; $Date &"M" ; $count =14 ; $Date &"N" ; "Error" ) )
Recommended Posts
This topic is 5642 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now