Click here to Skip to main content
15,889,865 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Show a form inside another form Pin
kindman_nb16-Nov-06 9:43
kindman_nb16-Nov-06 9:43 
QuestionVB 6 memory allocation and collections question Pin
el_scrub16-Nov-06 7:13
el_scrub16-Nov-06 7:13 
AnswerRe: VB 6 memory allocation and collections question Pin
Dave Kreskowiak17-Nov-06 1:45
mveDave Kreskowiak17-Nov-06 1:45 
GeneralRe: VB 6 memory allocation and collections question Pin
el_scrub20-Nov-06 5:30
el_scrub20-Nov-06 5:30 
GeneralRe: VB 6 memory allocation and collections question Pin
Dave Kreskowiak20-Nov-06 12:48
mveDave Kreskowiak20-Nov-06 12:48 
QuestionProblem with syntax highlighting Pin
Zyndrof16-Nov-06 7:06
Zyndrof16-Nov-06 7:06 
AnswerRe: Problem with syntax highlighting Pin
Johan Hakkesteegt17-Nov-06 5:42
Johan Hakkesteegt17-Nov-06 5:42 
QuestionTimeGetTime() Issue Pin
downfall2116-Nov-06 5:33
downfall2116-Nov-06 5:33 
I am creating a unique serial number for my ticket submissions.
I use the two letter state abbreviation, the julian date, and milleseconds to create the ticket number. ex"Ticket #: IA20063171383477656". This has been working great. But recently my code has
became flawed. My tickets are getting a hyphen inserted between the julian date and the milliseconds. I found this is because of a bug in the TimeGetTime() function. It starts to give negative numbers after a certain amount of uptime. How do I fix this negative number?

I need to keep the tickets sequential through the day. So 12:00am to 11:59pm will be one sequence of tickets then the sequence will change to the next julian date. Can someone please help me?

I have placed my code below.

Thanks
<script runat="server">
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

</script>

<script runat="server">
 Sub SendMail(sender As Object, e As System.EventArgs)
    Dim MyDate as String
    MyDate = Date.Now.ToString("MM/dd/yyyy")
    Dim Julian as String
    Julian = "IA" & Date2Julian(MyDate)& TimeGetTime()
    Ticket_ID.Value= Julian
End Sub
</script>

AnswerRe: TimeGetTime() Issue Pin
Dave Kreskowiak16-Nov-06 6:06
mveDave Kreskowiak16-Nov-06 6:06 
GeneralRe: TimeGetTime() Issue Pin
downfall2116-Nov-06 6:15
downfall2116-Nov-06 6:15 
GeneralRe: TimeGetTime() Issue Pin
Dave Kreskowiak16-Nov-06 6:21
mveDave Kreskowiak16-Nov-06 6:21 
GeneralRe: TimeGetTime() Issue Pin
downfall2116-Nov-06 6:47
downfall2116-Nov-06 6:47 
GeneralRe: TimeGetTime() Issue Pin
Dave Kreskowiak16-Nov-06 9:00
mveDave Kreskowiak16-Nov-06 9:00 
GeneralRe: TimeGetTime() Issue Pin
downfall2117-Nov-06 3:38
downfall2117-Nov-06 3:38 
GeneralRe: TimeGetTime() Issue Pin
Dave Kreskowiak17-Nov-06 13:27
mveDave Kreskowiak17-Nov-06 13:27 
QuestionAdd dll's, Clickonce deployment Pin
steve_rm16-Nov-06 5:27
steve_rm16-Nov-06 5:27 
QuestionListBox Control Pin
CodingYoshi16-Nov-06 5:24
CodingYoshi16-Nov-06 5:24 
AnswerRe: ListBox Control Pin
nlarson1116-Nov-06 6:15
nlarson1116-Nov-06 6:15 
AnswerRe: ListBox Control Pin
Dave Kreskowiak16-Nov-06 6:20
mveDave Kreskowiak16-Nov-06 6:20 
GeneralRe: ListBox Control Pin
CodingYoshi16-Nov-06 6:36
CodingYoshi16-Nov-06 6:36 
GeneralRe: ListBox Control Pin
CodingYoshi16-Nov-06 6:43
CodingYoshi16-Nov-06 6:43 
Questiondata from VB.NET to MS Excel Pin
Johan Hakkesteegt16-Nov-06 4:04
Johan Hakkesteegt16-Nov-06 4:04 
AnswerRe: data from VB.NET to MS Excel Pin
Kevin Nicol16-Nov-06 4:19
Kevin Nicol16-Nov-06 4:19 
GeneralRe: data from VB.NET to MS Excel Pin
Johan Hakkesteegt16-Nov-06 4:55
Johan Hakkesteegt16-Nov-06 4:55 
AnswerRe: data from VB.NET to MS Excel Pin
Kevin Nicol16-Nov-06 7:16
Kevin Nicol16-Nov-06 7:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.