01-17-2023 06:33 PM - last edited on 05-25-2023 05:49 AM by JackLacava
Hi, I have a CV Form where the input is a "Date" Cell Type. I need to use the date to translate to a OS Time Period. I am struggling with using the Date value in a Business Rule. It only returns an Integer and I can't seem to convert the integer to a Date in the BR so I can grab the Year (Dim strYear As String = Date.ToString("yyyy")). Any help with this?
thanks,
Greg
Solved! Go to Solution.
01-18-2023 10:11 AM
If I remember correctly, that integer is the number of ticks - so you just pass it to the constructor to get a DateTime object back, i.e.
Dim myDate as new DateTime(yourNumber)
01-18-2023 10:11 AM
If I remember correctly, that integer is the number of ticks - so you just pass it to the constructor to get a DateTime object back, i.e.
Dim myDate as new DateTime(yourNumber)
01-18-2023 12:57 PM
And after getting a real DateTime object, you can use: myDate.Year.ToString to get the year as a string type.
01-18-2023 01:52 PM
thanks everyone. I was finally able to get this to work. FYI, I had to use (Dim yournumber As Long) to be able to use the integer. As Integer errored out on me.