Jump to content

binarybiker

Members
  • Posts

    2
  • Joined

  • Last visited

binarybiker's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. 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
  2. How do I extract just a part of a string of text from a field in an LDAP directory?My XSLT grabs all the fields I need successfully, except for fields that have a fullpath.Example:I have a supervisor field that has the following data in it:CN=dmorgan,OU=Users,OU=Chicago,DC=ad,DC=thecompany,DC=orgAll I want to return is dmorganIn another select statement, all I want to return is Chicago.I know I need to modify the 'value-of' statement below, but I don't know the syntax.<xsl:element name="Field"> <xsl:attribute name="Name"><xsl:text>Supervisor</xsl:text></xsl:attribute> <xsl:value-of select="manager"/> </xsl:element>Thanks
×
×
  • Create New...