Date question

Results 1 to 2 of 2

Thread: Date question

  1. #1
    Join Date
    Dec 1969

    Default Date question

    Hi there,<BR><BR>I am using a third party calendar to input dates on my forms. It gives the user a nice graphical interface calendar so they don&#039;t have to manually type the date. Its format is mm/dd/yyyy and when I insert the date into my Access database it turns into mm/dd/yy. Then when I pull the date back out to the form it is mm/dd/yy but since it is different than the graphical calendar date format (which is mm/dd/yyyy) it causes the calendar to misreport the date. I can&#039;t figure out how to change the date format in the calendar so I thought that I would convert the date to mm/dd/yyyy when it comes back to the form. Any ideas on how to do this? Any better idea? Thanks!

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQ, category Dates and Times

    There is a link to the ASPFAQs at the top right corner of this very page.<BR><BR>Look in the category noted in the subject line of this message for your question.<BR><BR>The ASPFAQs are your friends. Visit your friends often.<BR><BR>*********************<BR><BR>"...when I insert the date into my Access database it turns into mm/dd/yy."<BR><BR>Nope. It sure does *NOT* do that.<BR><BR>Go read the FAQ.<BR><BR>You don&#039;t show the code for the calendar, so I can&#039;t guess what it&#039;s interface is. *IF* it is written in something other than VBScript, then yes, you might need to format the date the way it expects it. Try<BR> &#060;%<BR> dt = RS("theDate")<BR> formattedDate = Month(dt) & "/" & Day(dt) & "/" & Year(dt)<BR> %&#062;<BR>If it is fussy enough that it wants to always get 2 digit months and days, then:<BR> &#060;%<BR> dt = RS("theDate")<BR> formattedDate = Right(100+Month(dt),2) & "/" & Right(100+Day(dt),2) & "/" & Year(dt)<BR> %&#062;<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