in Search
ATTENTION: I've decided to put the upgrade on hold due to a compatibility issue of our server environment with the latest CS installer package. CS 2008 now requires SQL Server 2005 as the backend DB but our database server currenlty has SQL Server 2000 installed on it. I'll resume the upgrade once I figure out when Telligent is releasing a patch to the schema compatibility issue. For now, we will continue to use the old version of CS while waiting for the said patch. If you have any questions about this process, please don't hesitate to post them on our forums and I'll answer them as soon as I can. Thanks for your patience and support guys! I'll let you know as soon as this is resolved. - Keith Rull
Latest post 08-07-2008 9:47 AM by keithrull. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-07-2008 12:10 AM

    • zirc.net
    • Top 500 Contributor
    • Joined on 08-05-2008
    • Posts 3
    • Points 60

    Displaying as Date Format in Datagridview from Double data type

     tnx to all ho have answered my query from the past.

    again po i'll ask your magnificient kind of thingnking.

    my query statement was like this " SELECT cast(MATDATE as DOUBLE)  as 'MATURITY DATE' FROM LNACC"

    ang laman po kasi ng MATDATE field ko ay nk number (i.e. 38965 ay equivalent sa Mach 12, 2009(assume lang po itong value nya))

    paano ko po ito maidisplay sa DATAGRIDVIEW.

    or kahit po sa SELECT STATEMENT nlang po nya convert kung pwede.

    tnx. po

     

    Filed under:
    • Post Points: 20
  • 08-07-2008 1:31 AM In reply to

    Re: Displaying as Date Format in Datagridview from Double data type

    Hello Zirc.net, here's a sample code for your problem,I hope this helps...


    DECLARE @DateValue    datetime

    SET @DateValue = CONVERT(datetime,39452);

    -- Jan 07, 2008
    SELECT CONVERT(varchar,@DateValue,107)

    -- January 7, 2008
    SELECT DATENAME(month,@DateValue) + ' ' + CONVERT(varchar,DAY(@DateValue)) + ', ' + CONVERT(varchar,YEAR(@DateValue))

     

    Filed under:
    • Post Points: 20
  • 08-07-2008 2:02 AM In reply to

    • zirc.net
    • Top 500 Contributor
    • Joined on 08-05-2008
    • Posts 3
    • Points 60

    Re: Displaying as Date Format in Datagridview from Double data type

     tnx for the reply sir.

    sorry i didnt make my query clear

     

    i'm accesing foxpro free table like this...

    ACC    CHD  MATDATE ---- fields

    123     4        39865   ----- field value

    234     5        38659

    325     6         32651

    i use DATASETS to store my query ,my query goes on oledbadpater("SELECT ACC,CHD,MATDATE FROM LNACC",MYCON)

    then i use the FILL method. and then set is as the DATA SOURCE of my DATAGRIDVIEW.

    what i want is how i can display the MATDATE value into DATE Format instead the 39865,38659 eth.

    thnx

    • Post Points: 20
  • 08-07-2008 9:47 AM In reply to

    • keithrull
    • Top 10 Contributor
    • Joined on 08-08-2005
    • San Diego, CA
    • Posts 1,956
    • Points 39,165

    Re: Displaying as Date Format in Datagridview from Double data type

     hi zirc.net,

    I don't know how to do the proper query in foxpro but i do know how you can create a workaround for this issue in code. One of the things that always do is I try not to code against a dataset. Every time i retrive my data I always put it on it's own object(class) and build my processing logic from there. You could then create a DateTime property that would correspond to your double value by doing DateTime conversion. You can the use DateTime.FromOADate() to convert your numeric value to DateTime.

    HTH

     

    devpinoy sig

    • Post Points: 5
Page 1 of 1 (4 items)