date format

Results 1 to 3 of 3

Thread: date format

  1. #1
    Kay Guest

    Default date format

    I am new to asp and am having trouble reading a long format date from an access database and displaying it from a query as the month ie January, February ...instead of 02/11/99, which is what I am getting at the moment using the code below:<BR><BR>&#060;%=Server.HTMLEncode(rs.Fields( "date").Value)%&#062;<BR><BR>Any ideas where I am going wrong?

  2. #2
    Join Date
    Dec 1969

    Default RE: date format

    You could use the FormatDateTime Function to format the date as you wish.<BR><BR> has more info on this, I believe the link is on the left, and it says something about Date and Time???<BR><BR>HTH<BR><BR>Jerry

  3. #3
    Join Date
    Dec 1969

    Default Formatting Dates

    The date format in Access only applies to how it is displayed within the Access Application. It does not change how the date is represented internaly.<BR><BR>If you need to display a date in a specific format you should strongly consider manualy splitting up the parts<BR>&#060;%<BR>dtDate = rs("date")<BR>Response.Write MonthName(dtDate) & " " & Day(dtDate) & ", " &Year(dtDate)<BR>%&#062;<BR>p.s. <BR>The fields collection is the default collection for a rs.<BR>The value method is the default method of a rs field.<BR><BR>:)<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