User Profile

Collapse

Profile Sidebar

Collapse
andreas2410
andreas2410
Joined: Jan 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • andreas2410
    replied to quick date conversion - not hard!
    im also thinking that i will need when i try convert

    to put it into the style code either

    code 20 or 120 yyyy-mm-dd hh:mi:ss(24h)

    so thats 24 hour which is what i need and then rip the separators

    or in code 126 below so theres no spaces, but i dont think thats 24 hr representation

    code 126 yyyy-mm-dd Thh:mm:ss.mmm(n o spaces)...
    See more | Go to post

    Leave a comment:


  • andreas2410
    started a topic quick date conversion - not hard!

    quick date conversion - not hard!

    im trying to convert my column of data type datetime. this is an example of what the data looks like:

    2007-01-24 10:01:29.710

    i want to format it as so

    200701241001

    ive tried this so far i think im sort of on the right track

    RIGHT('00000000 0000' + CONVERT(varchar (20), CONVERT(int, sr.ResponseDate )),12) AS FinalDate

    but its not outputting exactly what i want...
    See more | Go to post

  • andreas2410
    replied to price formatting
    legend! thanks heaps buddy

    =)
    See more | Go to post

    Leave a comment:


  • andreas2410
    replied to price formatting
    heres the offending code

    declare @a varchar(10)
    declare @b varchar(10)

    SELECT DateEntered, dbo.Site.SiteCo de AS SiteCode, ('0' + DepartmentID) AS FuelCode, convert(varchar (10),CurrentPri ce)
    FROM dbo.vwCurrentFu elPrice, dbo.Site
    WHERE dbo.vwCurrentFu elPrice.SiteID = dbo.Site.SiteID

    set @a = convert(varchar (10),dbo.vwCurr entFuelPrice.Cu rrentPrice)
    set @b =Replace(@a,'.' ,'')...
    See more | Go to post

    Leave a comment:


  • andreas2410
    replied to price formatting
    all of the code works perfectly fine, the thing is thought, that in dbo.vwCurrentFu elPrice there has a column CurrentPrice that i want to format in the way i described above. i want to be able to get it every time without having to manually enter the prices 1.1490 etc. thats how it gets put in if you get my drift.. thanks!
    See more | Go to post

    Leave a comment:


  • andreas2410
    started a topic price formatting

    price formatting

    ok, i have a column of data type money and the data that is found in there is entered like this

    1.1490
    1.2340
    1.0590
    0.5990
    0.5380

    what i want to do is have it formatted as such
    1149
    1234
    1059
    0599
    0538

    ive tried using cast, convert, from money to varchar and simplying multiplying the field, replace and trunc but its not happening !!! any code...
    See more | Go to post
No activity results to display
Show More
Working...