Visualizzazione dei risultati da 1 a 4 su 4

Discussione: formato data

  1. #1

    formato data

    Ciao forum,
    ho questa variabile che richiama la data corrente:

    todaydate = FormatDateTime(Now(), vbShortDate)

    Il problema è che lo fa secondo il formato americano (quindi mm/gg/aaaa). Come faccio a convertirla in formato italiano?

    Ho già provato il seguente codice che mi era stato consigliato, ma niente da fare.

    todaydate = day(date) & "/" & month(date) & "/" & Year(date)

    Grazie a tutti

  2. #2
    Non capisco
    a me da il formato giusto gg/mm/aaaa
    comunque prova con:

    Session.LCID = 1040
    todaydate = FormatDateTime(Now(), vbShortDate)
    response.write todaydate


  3. #3
    hehe...non mi ha mai dato la data in formato errato lol
    http://igr4mbo.altervista.org (piano piano)

    "Abbiamo costruito un sistema che ci persuade a spendere il denaro che non abbiamo in cose che non necessitiamo per creare impressioni che non dureranno su persone che non ci interessano" cit.

  4. #4

    Vi posto il il file in questione

    <%session.LCID = 1040%>
    <%

    Dim dConn, database_path, logincode, allow_html, strSQL, active, errormsg
    dim newstitle, newsRS, data, iRecFirst, iRecLast, I, show_stories, errormsg2, loginlink
    Dim news_id, news_title, news_expire, news_dat, news_body, id, fnum, recordcount, updateRS
    Dim Message, updateSQL, FormLogin, FormPwd, urecordcount, showall, textcolor, todaydate

    '============== USER EDITABLE AREA ===================
    newstitle = "News"
    logincode = "****"
    show_stories = "10"

    database_path = Server.MapPath("/mdb-database/news_data.mdb")
    '============== USER EDITABLE AREA ===================

    errormsg = "<h2>Error - Invalid Record</h2>"
    errormsg2 = "<h2> No active news items.</h2>"
    loginlink = "

    admin</p>"
    todaydate = FormatDateTime(Now(), vbShortDate)
    'FUNCTIONS
    FUNCTION CheckDate(dtvalue)
    if dtvalue <> "" then
    if IsDate(dtvalue) = True then
    Checkdate = dtvalue
    else
    Response.write ("

    date format is incorrect</p>")
    Response.end
    end if
    end if
    END FUNCTION

    FUNCTION PreSubmit2(p_sTargetString)
    PreSubmit2 = REPLACE(p_sTargetString,"textarea","")
    PreSubmit2 = REPLACE(PreSubmit2,"%","&#37;")
    PreSubmit2 = REPLACE(PreSubmit2,"'","&#39;")
    PreSubmit2 = REPLACE(PreSubmit2,"""","&quot;")
    PreSubmit2 = REPLACE(PreSubmit2,"<","&lt;")
    PreSubmit2 = REPLACE(PreSubmit2,">","&gt;")
    PreSubmit2 = REPLACE(PreSubmit2,vbcrlf,"
    ")
    PreSubmit2 = Trim(PreSubmit2)
    END FUNCTION

    FUNCTION undo(p_sTargetString)
    undo = REPLACE(p_sTargetString,"
    ",vbcrlf)
    undo = REPLACE(undo,"&lt;","<")
    undo = REPLACE(undo,">","&gt;")
    undo = Trim(undo)
    END FUNCTION
    %>
    <style type="text/css">
    BODY
    {
    font-family: Tahoma
    }

    .cssBorder
    {
    BORDER-BOTTOM: black 1px solid;
    BORDER-LEFT: black 1px solid;
    BORDER-RIGHT: black 1px solid;
    BORDER-TOP: black 1px solid;
    PADDING-LEFT: 2px;
    font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    }

    .required
    {
    background-color: FFFF99;
    }
    </style>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.