Puru
New member
- Joined
- Sep 1, 2005
- Messages
- 1
- Programming Experience
- Beginner
I need some help in generating Invoice Number in my Program using current System Date. I have made the following declarations as given below.
Dim d1 As DateTime = DateTime.Now
Dim MyDate As String = d1.ToString("yyMMdd")
Since the Date changes at Midnight which ultimately reflects in the next Invoice number. I want to keep the previous Date in invoice number till the System time reaches 12:00 noon.
i.e
If (d1.Hour < 12) And (d1.Hour > 0) Then
......(Here in need the required code to retain the Previous System Date)
.....
End If
Please guide me!!
Dim d1 As DateTime = DateTime.Now
Dim MyDate As String = d1.ToString("yyMMdd")
Since the Date changes at Midnight which ultimately reflects in the next Invoice number. I want to keep the previous Date in invoice number till the System time reaches 12:00 noon.
i.e
If (d1.Hour < 12) And (d1.Hour > 0) Then
......(Here in need the required code to retain the Previous System Date)
.....
End If
Please guide me!!