Click here to Skip to main content
15,885,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Updated 18-Jul-16 13:39pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900