Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010

    Unanswered: Convert Text to Date/Time

    I have a date/time field (MM/DD/YYYY hh:mm) that is in GMT, I convert it to local time with the below formula

    Created Date (LocalTime): [Activity].[CreatedDate]-NZ([TimeZone Conversion Table].[AdjToLocal],0)

    after this take place it's turned into a Text String 40189.3694444444

    How do I convert it back to Date/Time?

  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    I suspect the Nz() function is causing the problem. Why don't you just use the DateAdd() function to subtract the hours?

    And I would drop all the spaces and symbols in your names.

  3. #3
    Join Date
    Mar 2009
    Provided Answers: 15
    To revert to a date, use the CDate() function. Here (western Europe), Debug.Print CDate(40189.3694444444) yields 11/01/2010 8:52:00
    Have a nice day!

Posting Permissions

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