Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di mmaria
    Registrato dal
    Apr 2003
    Messaggi
    594

    Voglio la data GGMMAA e non MMGGAA

    Ciao amici lavoro in Asp
    Al momento di registrare la data nel Db me la registra nel formato MMGGAA. Io voglio che lo faccia GGMMAA

    Come devo intervenire in questo script?


    <%
    'This function generat a MMM DD YYYY format
    Function fDate(d)
    fDate = Left(MonthName(Month(FormatDateTime(d,2))),3) & "." & Day(FormatDateTime(d,2)) & "." & Year(FormatDateTime(d,2))
    End Function

    Function fTime(t)
    Dim str
    if Hour(FormatDateTime(t,4)) > 12 then
    str = " pm"
    else
    str = " am"
    end if
    fTime = FormatDateTime(t,4) & str
    End Function
    %>
    Grazie per quello che hai fatto...

  2. #2
    Prova così:
    <%

    'This function generat a DD MMM YYYY format
    Function fDate(d)
    fDate = Day(FormatDateTime(d,2)) & "." & Left(MonthName(Month(FormatDateTime(d,2))),3) & "." & Year(FormatDateTime(d,2))
    End Function

    Function fTime(t)
    Dim str
    if Hour(FormatDateTime(t,4)) > 12 then
    str = " pm"
    else
    str = " am"
    end if
    fTime = FormatDateTime(t,4) & str
    End Function
    %>

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.