#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    7
    Rep Power
    0

    MS SQL Timestamp Print Solid Square?


    Hi,

    I've got a SELECT statement running against a remote MSSQL database which is working fine however one of the fields is printed by Python as a solid square.

    I think this is because the field type is timestamp and possibly binary?

    Could anyone tell me how to get the actual value as a string rather than the solid square?

    Many thanks
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,897
    Rep Power
    481
    Perhaps the time stamp contains a unicode glyph that your display cannot render correctly?
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    7
    Rep Power
    0
    Thanks for the reply, the date / time value is being returned as 0x00000000000007D1 I'm not sure if its a glyph issue.

    I'm currently looking at binascii to try and fix...

    Any further ideas / suggestions?
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,897
    Rep Power
    481
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    7
    Rep Power
    0
    Thanks for the help but decided it was proving too much time to sort out so have simply prevented my script from trying to print timestamp fields!!!

    Oh well

IMN logo majestic logo threadwatch logo seochat tools logo