Date Format

Results 1 to 2 of 2

Thread: Date Format

  1. #1
    Join Date
    Dec 1969

    Default Date Format

    Is there a way (other than using a bunch of splits and replaces) to get dates in the format of<BR><BR>mm/dd/yy<BR><BR>I know I can use FormatDateTime(dateVar, 2) to come up with mm/dd/yyyy, but I need to use the two digit year value and not the four.<BR><BR>Thanks in advance.<BR>Nick

  2. #2
    Join Date
    Dec 1969

    Default You could change the LCID...

    ...find a Session.LCID value that uses 2-digit year by default. But I would bet that if you do you&#039;ll also get day before month and have DD/MM/YY<BR><BR>But what&#039;s the big deal?<BR><BR>Function NicksDate( dt )<BR> dt = CDate( dt ) &#039; just to be sure<BR> NicksDate = Right( "0" & Month(dt), 2 ) & "/" _<BR> & Right( "0" & Month(dt), 2 ) & "/" _<BR> & Right( CSTR(Year(dt)), 2 )<BR>End Function<BR>

Posting Permissions

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