date format mmddyy in asp???

Discussion in 'ASP General' started by weiwei, May 14, 2004.

  1. weiwei

    weiwei Guest

    hi,
    is there anyway that I can validate my date format in asp?? I have
    tried like date=now(), that gives me like 5/14/2004, the format should
    be mmddyy, no space, no dash, and has to include 0 if month is from
    1-9, for example 01, 02, like that????
    please help me out
    thanks in advance
    Wei
    weiwei, May 14, 2004
    #1
    1. Advertising

  2. weiwei

    DLBJR Guest

    Function FormatMyDate(dtmDate)
    FormatMyDate = "Error"
    If IsDate(dtmDate) Then
    FormatMyDate = Right("00" & Month(dtmDate),2) & Right("00" &
    Day(dtmDate),2) & Right(Year(dtmDate),2)
    End If
    End Functon

    'from dlbjr

    'Discerning resolutions for the alms
    DLBJR, May 15, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Candy
    Replies:
    2
    Views:
    1,155
    Janaka
    Feb 18, 2004
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,244
    Michael Borgwardt
    May 30, 2004
  3. Chu
    Replies:
    3
    Views:
    4,184
    Shawn
    Aug 15, 2006
  4. Replies:
    1
    Views:
    3,600
    Daniele Futtorovic
    Feb 16, 2008
  5. Josh Sharpe
    Replies:
    1
    Views:
    205
    Brian Candler
    Sep 21, 2010
Loading...

Share This Page