Convert DateTime

Results 1 to 4 of 4

Thread: Convert DateTime

  1. #1
    Sharon Guest

    Default Convert DateTime

    Good morning, I am trying to convert from a database the date time stamp to exclude the time, so basiclly I want just the date.<BR>I used:<BR>Convert(datetime,dbo.TixArchive.Create_Da teTime,101)<BR>but just doesn&#039;t seem to be correct. Thank for all advice and assistance. <BR>Sharon

  2. #2
    J Guest

    Default RE: Convert DateTime

    try...<BR>CONVERT(varchar(10), DateTimeField, 101)

  3. #3
    Arjan Guest

    Default RE: Convert DateTime

    make a new variable. Try something like this:<BR>newdate = month(yourdate) & "-" & day(yourdate) & "-" & year(yourdate)<BR>now you will get your date/time in a format like 5-30-2001.<BR><BR>Good luck !!! <BR>Arjan Breeuwer (<BR>

  4. #4
    Daniel Newman Guest

    Default RE: Convert DateTime

    Or, within the ASP page, just use a simple:<BR><BR>Response.Write FormatDateTime(objRS("yourdate"),1)<BR><BR>There&# 039;s a lot of options on this one. Check it out at<BR><BR>Daniel

Posting Permissions

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