Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Display format - Price

Display format - Price

Scheduled Pinned Locked Moved Database
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DotNet
    wrote on last edited by
    #1

    As I have this, Dim CommandText2 As String = "Select SUM(PeriPrice) FROM Peripheral Where PCID='P0003'" It sums up, and displayed "3399.000" on the datagrid. But I want - 3,399.00. Is there any way to do it? Please help. Thanks.

    A 1 Reply Last reply
    0
    • D DotNet

      As I have this, Dim CommandText2 As String = "Select SUM(PeriPrice) FROM Peripheral Where PCID='P0003'" It sums up, and displayed "3399.000" on the datagrid. But I want - 3,399.00. Is there any way to do it? Please help. Thanks.

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      Select Right(Replicate('',10) + Convert(varchar(11),Convert(Decimal(10,2),SUM(PeriPrice))),11) FROM Peripheral Where PCID='P0003'

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups