Jeremy G Posted November 13, 2009 Posted November 13, 2009 I hope that this should be easy. I need to find out if I can have a certain field automatically file in the date format I need. When we open a sort (say today) it goes 00220091112KA This is broken down by 00220 (Our Location number which never changes) 09 (year) 11 (month) 12 (day) K (never changes) A (starting at A and ending on which letter we are on for that night). When I go to put a project into the system I enter the date in the date field 11/12/09 and the project number automatically populates 00220 I would have to fill in the rest of the numbers 091112KA. I would like it when I put in the date it automatically puts 0022091112K Which i would just put A or B or C depending on which project we are on for that day. Any advice or am I just stuck with it putting 00220?
jamesducker Posted November 13, 2009 Posted November 13, 2009 As long as you have the project letter ("A") in a field somewhere, no problem. Use the following calculation in a field or script step: "00220" & right(year(get(currentdate)),2) & month(get(currentdate)) & day(get(currentdate)) & "K" & currentProjectLetter That should do it. A tip if you want leading zeroes in your month and day parts, replace: day(get(currentdate)) with right ( "0" & day(get(currentdate)) ; 2 ) Hope that helps. Would be interested to know what you need it for ie the wider context. James
Jeremy G Posted November 13, 2009 Author Posted November 13, 2009 (edited) This is how we do our job numbers. Like tomorrow (11/13/09) would start out new with 00220091113KA If we get two jobs tomorrow the next project would be 00220091113KB and so on. And that worked! Thank you! Edited November 13, 2009 by Guest
Recommended Posts
This topic is 5489 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