Results 1 to 4 of 4

Thread: Creating New Date/Time Variables and Formats

  1. #1
    Stephen C. Nodvin Guest

    Creating New Date/Time Variables and Formats

    My Access databases has a field named "CallDate"
    This field contains a value representing the Date and Time of each record.

    AspDb displays "CallDate" as "8/6/98 5:53:20 PM"

    What I actually want to do is to create TWO fields
    1) Date in a standard date format
    2) Time in "Military" time

    So "Date" would display: "8/6/98"
    and "Date" would display: "17:53:20"

    I think this could be done maybe with VBScript and MagicCell?

    For example, I am able to display the date from the server using:
    <%=Server.HTMLEncode((FormatDateTime(Now(),2)))% >
    and the time from the server using:
    <%=Server.HTMLEncode((FormatDateTime(Now(),4)))% >

    You can what I am trying to do at the URL :
    http://tel_manage.televid.com/admin/management/management.html
    follow the tree to Central_Server:Errors
    you will need the following:
    login_id: next_gen
    password: telco

    Look at the "CallDate" field.

    Thanks to all who might be able to help.

    Stephen Nodvin
    TeleVideo Global, Inc.
    http://www.televid.com/



  2. #2
    Frank Guest

    Creating New Date/Time Variables and Formats (reply)

    Nodvin,
    You can use FULL VB formatting in the magic Cell. Look at the following code -

    <%
    Response.write("<center><h3> Test Magic Cell - Date<BR></h3></center>")
    Set X=Server.CreateObject("AspDB.Pro")
    X.dbQuickProps="13;NWIND;orders;grid;4,auto,lightg reen"
    X.dbNavigationItem="top,bottom,prev,next"
    X.dbMagicCell="ShippedDate,,Format=[MM/DD/YY hh:mm:ss]"
    X.aspdbPro
    %>

    Replace the formtat string inside the [..] to the one that fits your need.

    Frank



    On 9/30/98 9:40:06 AM, Stephen C. Nodvin wrote:
    > My Access databases has a field named "CallDate"
    This field contains a
    > value representing the Date and Time of each record.

    AspDb displays
    > "CallDate" as "8/6/98 5:53:20 PM"

    What I actually want to do is to
    > create TWO fields
    1) Date in a standard date format
    2) Time in
    > "Military" time

    So "Date" would display: "8/6/98"
    and "Date" would
    > display: "17:53:20"

    I think this could be done maybe with VBScript and
    > MagicCell?

    For example, I am able to display the date from the server
    > using:
    <%=Server.HTMLEncode((FormatDateTime(Now(),2)))% >
    and the time
    > from the server using:

    > <%=Server.HTMLEncode((FormatDateTime(Now(),4)))% >

    You can what I am
    > trying to do at the URL
    > :
    http://tel_manage.televid.com/admin/management/management.html
    follow
    > the tree to Central_Server:Errors
    you will need the following:
    login_id:
    > next_gen
    password: telco

    Look at the "CallDate" field.

    Thanks to
    > all who might be able to help.

    Stephen Nodvin
    TeleVideo Global,
    > Inc.
    http://www.televid.com/



  3. #3
    Stephen Nodvin Guest

    Creating New Date/Time Variables and Formats (reply)

    Frank:

    I think there might be a BUG in the control.

    I used your suggestion and entered the line:

    "CallDate, align=Left , <font size=2 face=ARIAL color=black> Format=[MM/DD/YY hh:mm:ss]"

    I get the correct format
    HOWEVER all of the results have an "8" tacked onto the end.
    e.g 08/06/98 17:53:208

    Is this a BUG or do you have additional suggestions?

    Thanks,

    Stephen



    On 9/30/98 3:02:45 PM, Frank wrote:
    > Nodvin,
    You can use FULL VB formatting in the magic Cell. Look at the
    > following code -

    <%
    Response.write("<center><h3> Test Magic Cell -
    > Date<BR></h3></center>")
    Set
    > X=Server.CreateObject("AspDB.Pro")
    X.dbQuickProps="13;NWIND;orders;grid;4,
    > auto,lightgreen"
    X.dbNavigationItem="top,bottom,prev,next"
    X.dbMagicCell
    > ="ShippedDate,,Format=[MM/DD/YY hh:mm:ss]"
    X.aspdbPro
    %>

    Replace the
    > formtat string inside the [..] to the one that fits your
    > need.

    Frank




  4. #4
    Frank Guest

    Creating New Date/Time Variables and Formats (reply)

    Stephen,

    What is your version number ? I`ll retrieve that version and check it out. But the newer versions I`ve been working on has no such bug. Meanwhile, get the latest from support to get rid of the bug if there is one in your version.

    Frank

    On 9/30/98 3:59:25 PM, Stephen Nodvin wrote:
    > Frank:

    I think there might be a BUG in the control.

    I used your
    > suggestion and entered the line:

    "CallDate, align=Left , <font size=2
    > face=ARIAL color=black> Format=[MM/DD/YY hh:mm:ss]"

    I get the correct
    > format
    HOWEVER all of the results have an "8" tacked onto the end.
    e.g
    > 08/06/98 17:53:208

    Is this a BUG or do you have additional
    > suggestions?

    Thanks,

    Stephen



    On 9/30/98 3:02:45 PM, Frank
    > wrote:
    > Nodvin,
    You can use FULL VB formatting in the magic Cell. Look
    > at the
    > following code -

    <%
    Response.write("<center><h3> Test Magic
    > Cell -
    > Date<BR></h3></center>")
    Set
    >
    > X=Server.CreateObject("AspDB.Pro")
    X.dbQuickProps="13;NWIND;orders;grid;4,
    >
    >
    > auto,lightgreen"
    X.dbNavigationItem="top,bottom,prev,next"
    X.dbMagicCell
    >
    > ="ShippedDate,,Format=[MM/DD/YY hh:mm:ss]"
    X.aspdbPro
    %>

    Replace
    > the
    > formtat string inside the [..] to the one that fits your
    >
    > need.

    Frank




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •