European Date Display from DB

Results 1 to 3 of 3

Thread: European Date Display from DB

  1. #1
    Stephan Brun Guest

    Default European Date Display from DB

    How do I get the Date-Fields from an Access-DB to be displayed the european way (day/month/year)? The Web-server is located in the US..

  2. #2
    Marco Savini Guest

    Default RE: European Date Display from DB

    I use a function like this:<BR><BR>function getFormattedDate(datDate,strCountry)<BR>dim strDate<BR> <BR> strDate="n/a"<BR> if isdate(datDate) then<BR> select case strCountry<BR> case "CH"<BR> strDate=day(datDate) & "." & month(datDate) & "." year(datDate)<BR> case "IT"<BR> strDate=day(datDate) & "-" & month(datDate) & "-" year(datDate)<BR> end select<BR> end if<BR><BR> getFormattedDate=strDate<BR><BR>end function<BR><BR>Consider, that also in europe, there are different date formats; using this function always when you output a date ensrures you, that it works, even if you move your access-database to germany, for example.<BR><BR>Of course, you can always extend the list of countries.<BR><BR>Hope this helps<BR>MS

  3. #3
    Stephan Brun Guest

    Default RE: European Date Display from DB

    Thanks Marco, but does this also work when the displayed date is a hyperlink to the recordset?<BR>Please see:<BR><BR>as an example, click on a date..<BR><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