Skip to main content
Newcomer
January 17, 2023
Solved

Using Date Cell Type in a BR

  • January 17, 2023
  • 2 replies
  • 0 views

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

Best answer by JackLacava

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)

2 replies

OneStream Employee
January 18, 2023

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)
Contributor
January 18, 2023

And after getting a real DateTime object, you can use: myDate.Year.ToString  to get the year as a string type.

Newcomer
January 18, 2023

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.