//************************************** // Name: Convert Number to Positional String // Description:Converts a UInteger to a string and appends the appropriate positional suffix. eg: 1st, 22nd, 114th, etc // By: Jon Brown // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** Public Function ToPositionalString(ByVal number As UInteger) As String Dim rv As String = number.ToString Select Case Right(rv, 1) Case "1" rv &= IIf((Right(rv, 2) = "11"), "th", "st") Case "2" rv &= IIf((Right(rv, 2) = "12"), "th", "nd") Case "3" rv &= IIf((Right(rv, 2) = "13"), "th", "rd") Case Else rv += "th" End Select Return rv End Function