SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast zink's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get Tomorrow's Date?

    Hey all

    This seems like a very basic question but it's driving me mental, I can't for the life of me figure out an easy way of how to do this!

    All I want is to get tommorrows date in the following format DD/MM/YYYY

    Obviously it needs to be clever enough to work out what it will be if it's the 31st of the month or 31st december etc..

    I have managed to implement in javascript but I need to extract the javascript variable and write to a DB via ASP which probably more difficult than this!

    Please help!

    Cheers
    Zinc

  2. #2
    SitePoint Addict Richard Conyard's Avatar
    Join Date
    Jun 2005
    Posts
    373
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    dateadd("d", 1, now)

  3. #3
    SitePoint Enthusiast zink's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Richard ! I literally found this function about 1 hour ago. Here is my code, for anyone who is interested! It breaks each date into it's parts - yeah yeah it's messy

    Code:
    dateNow = Date()
    dateNowDay = Day(dateNow)
    dateNowMonth = Month(dateNow)
    dateNowYear = Year(dateNow)
    
    dateNextMonth = DateAdd("m",1,dateNow)
    dateNextMonthDay = Day(dateNextMonth)
    dateNextMonthMonth = Month(dateNextMonth)
    dateNextMonthYear = Year(dateNextMonth)


Bookmarks

Posting Permissions

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