Domanda

Sono stato a questo per un'ora, ma non riesco a formattare una stringa come percentuale mentre sto facendo il giro di un dati. Qualche idea? Il valore della stringa che viene passato è "3.22"

    Public Function securityDt() As DataTable

    Dim secMasterDt As New clsDataSecurity
    Dim dt As New DataTable

    dt = secMasterDt.getSecurityMasters()

    For Each row As DataRow In dt.Rows
        Dim divYieldColumn As String
        divYieldColumn = String.Format("{0:p}", row("dividend_yield"))
        row("dividend_yield") = divYieldColumn
    Next

    Return dt

End Function

Grazie!

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top