Jump to content

Julian Date


binarybiker
 Share

Recommended Posts

How do I convert a date field on the fly in an XSLT?My XSLT grabs a field called hiredate.HireDate is stored as number of seconds from a certain date (the way Excel stores it)I need to convert the stored date in my value-of select statement to a format of MM/DD/YYYYI was told that the followinig will convert a dateINTEGER8 TO DATEGiven:lngDate=Integer8 Date valuelngBias=300 //bias to adjust for local time Returns: dtmDate = date lngHigh = objDate.HighPart ‘upper 32 bits of the integer lngLow = objDate.LowPart ‘lower 32 bits of the integer ' Correct for inaccuracy in IADsLargeInteger property methods. If lngLow < 0 Then lngHigh = lngHigh + 1 End If ‘make sure valid before converting to dtmDate If Not ((lngHigh = 0) And (lngLow = 0)) Then If Not ((lngHigh = 0) And (lngLow = -1)) Then ' Convert to date in local time zone. dtmDate = #1/1/1601# + (((lngHigh * (2^32)) _ + lngLow)/600000000 - lngBias)/1440 End If End If End If Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...