Hi, all.
I have inserted a new module as following :
Option Explicit
' RETURNS: A three digit Julian day as a string.
Function Date2Julian(MyDate As Date) As String
Date2Julian = Format(MyDate - DateSerial(Year(MyDate) - 1, 12, 31), "000")
End Function
This module is to turn my date into 3 digit number
I was wondering how i can copy the dateA column into another B column as Julian ? I tried below method but it failed somehow.
Private Sub dateA_AfterUpdate
Me.ItemJDate = DoCmd.OpenFunction(Date2Julian(ItemDate))
Me.ItemJDate.Requery
Please rectify me if had anything wrong ?
I have inserted a new module as following :
Option Explicit
' RETURNS: A three digit Julian day as a string.
Function Date2Julian(MyDate As Date) As String
Date2Julian = Format(MyDate - DateSerial(Year(MyDate) - 1, 12, 31), "000")
End Function
This module is to turn my date into 3 digit number
I was wondering how i can copy the dateA column into another B column as Julian ? I tried below method but it failed somehow.
Private Sub dateA_AfterUpdate
Me.ItemJDate = DoCmd.OpenFunction(Date2Julian(ItemDate))
Me.ItemJDate.Requery
Please rectify me if had anything wrong ?