Problem: I have inherited a fairly robust Sharepoint 2010 Extranet where our organization generates work orders, delivery slips and other documents for providing different services like Laundry, Janitorial, Yard etc. I have SQL experience, but am a novice on Sharepoint, but I think I have a great solution for this problem. Currently we track the services for our laundry on Delivery Tickets which are time and date stamped. The original developer labeled the text boxes for this field [INVOICE] as INVOICE NUMBER, but they are a true blue Date, Time stamp for when the delivery ticket was genrated. I would like to copy that same changing field, and convert it to a Julian date so that it appears as an invoice # as my only task is to generate an incremental invoice number that our accounting team will use to strictly identify the sequence, and manually generate an Invoice base on that same number in our separate accounting package.
What I have tried:
I have tried to just create an incremental integer on the .rdl file, but I can't even figure out how to do that. I am afraid to create any new Data Fields or other structual changes to the database, thats why I am basically trying to figure out how to use the invoice number which is actually a date, and make it look like an invoice number, that way you could basically convert the Julian version of the invoice number to find the exact date and time the ticket was generated.
- update - I have found a Convert Date to Julian Date Function, but I don't know how to pass the Invoice.Value (which is the date) to this function:
{Public Function Date2Julian(ByVal vDate As Date) As Long
Date2Julian = CLng(Format(Year(vDate), "0000") _
+ Format(DateDiff("d", CDate("01/01/" _
+ Format(Year(vDate), "0000")), vDate) _
+ 1, "000"))
End Function]
http://www.freevbcode.com/ShowCode.asp?ID=5669