> Forums > Active Forums > Themes and Templates > Convert ForumTopics.LastPostDate to Date format
Last Post 11 Jan 2011 12:29 PM by fatgeorge. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Not Resolved
fatgeorge
Customers
fatgeorge
Post Count:291

--
11 Jan 2011 11:11 AM
    • DotNetNuke Version: 5.5.1
    • Active Forums Version: 4.3.3
    I presume that you are using something similar to:

    Select DATEADD(MI,LastPostDate,'20000101')
    from ActiveForums_ForumTopics

    To convert the integer field into a usable date format.

    Can you confirm the method you use please?
    Will Morgenweck Forum Admin
    DotNetNuke Staff
    Will Morgenweck
    Post Count:7672

    --
    11 Jan 2011 11:39 AM
    The value in that field is being generated as follows.
    DATEDIFF(ss,'01/01/1970 00:00:00 AM',DATECREATED)

    You will notice that there are a couple other date fields also in that table. We are only using the LastPostDate for indexing/sorting purposes since it will produce better results than a typical datetime field.
    Will Morgenweck
    Director of Product Management
    DotNetNuke Corp.
    fatgeorge
    Customers
    fatgeorge
    Post Count:291

    --
    11 Jan 2011 12:29 PM
    Thanks Will,

    Got it.
    You are not authorized to post a reply.
    > Forums > Active Forums > Themes and Templates > Convert ForumTopics.LastPostDate to Date format
    test
    Copyright 2012 by DotNetNuke Corporation / Terms of Use / Privacy