Date Format in ASP

Date Format in ASP

Από {manrj}

Giati eno xtizo tin imerominia stin asp gia to query mou, apo elliniko XP client exo allo apotelesma?

Euxaristo!

  1. 1/9/2004

    Είναι πιθανό η ημερομηνία να έχει άλλη μορφή.
    Αυτό που είχα σαν πρόβλημα είναι να παίρνω την ημερομηνία σε μορφή MM/DD/YYYY και όχι DD/MM/YYYY όπως περιμένεις.
    Αν όντως είναι αυτό το πρόβλημα σου, ψάξε μέσα στο tip.gr,
    έχει συζητηθεί αρκετά σε παλιότερα post.

  1. 1/9/2004

    <%
    function MediumDate (str)
    Dim aDay, aMonth, aYear
    aDay = Day(str)
    aMonth = Monthname(Month(str),True)
    aYear = Year(str)
    MediumDate = aDay & "-" & aMonth & "-" & aYear
    end Function

    function formatDate(str)

    formatDate=day(str)&"/"&month(str)&"/"&year(str)

    end function
    %>

  1. 1/9/2004

    Exo to parakato Query:

    select * from tableName where start_date >=#01/01/2004# and start_date < #02/01/2004# order by start_date

    Auto fernei oles tis egrafes tou Ianouariou
    Doulevi mia xara oxi omos kai an to kaleseis apo XP Elliniko

    Otan to kano response.write kai to koitao apo XP Elliniko tote
    to vlepo etsi:

    select * from tableName where start_date >=#01/01/2004# and start_date < #01/02/2004# order by start_date

    Tin imerominia tin ftiaxno me antistoixes functions san autes pou mou esteile o Alex kai xrisimopoio ta parakato sto include arxeio:

    Session.CodePage = 1253
    Session.LCID = 1032


    Euxaristo!




   Πίσω στην προηγούμενη σελίδα