Results 1 to 2 of 2

Thread: Adding Dates

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64

    Question

    Is there a way of taking a date/time from a SYSTEMTIME structure, performing a calculation (i.e. add one hour) and then storing the newly calculated date in another SYSTEMTIME structure.

    Or, to put it another way, is it possible to have the DateAdd function return a date in the format that that original date was passed in as, and not the format set in the regional settings.

    I want to be able to add/minus one hour to a specifc date and then store the values for the day, month, year, hour, minute and second seperately.

    Any ideas ?

  2. #2
    Guest
    Well, you can always grab your date, then use DateAdd() to modify the date by an hour, and then use the DatePart() function a few times to seperate your new date into the parts you want. Check out the documentation on DatePart() for more details.

    Paul

Posting Permissions

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



Click Here to Expand Forum to Full Width