jccorner Posted January 26, 2005 Posted January 26, 2005 Here's my issue. I'm performing a conversion from an AS400. One of the fields in the pf is a date field, but as in the AS400 it is stored as a numeric five digit number. I'm attempting to bring the info into a date field on Firebird as a date type in a VB.Net program. Now here's the issue, in VB6 this code would work: Dim wrkDate as Date wrkDate = 55909 Label1.Caption = wrkDate Label1 would then display 1/25/2053. Reason being is because in VB6 date types are handled as a numeric, but when I try to plug in the same code into a VB.Net app it won't handle it. So what are date types in .Net?? I even know that when you put a number in Excel and then format the cell to a date it will convert it to a date as well. I've been searching to see how dates are handled in .Net but to no avail. Appreciate the insight. Quote Applying computer technology is simply finding the right wrench to pound in the correct screw
*Experts* mutant Posted January 26, 2005 *Experts* Posted January 26, 2005 Use the FromAODate method of the Date type. Dim d As Date = Date.FromAODate(55909) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.