Results 1 to 3 of 3
  1. #1
    monkeyman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2011
    Posts
    3

    ISO8601 Date in a IIF Statement

    Hello,

    I need a field in a query to show todays date and a date 10 days from now in ISO8601 format like this:



    2011-03-01T13:00:00Z/2011-03-11T15:30:00Z

    It should only display when another field is "true". Here's what I have so far and it's incomplete:

    sale price effective date: IIf([inventory]![SaleOn]=Yes,Date())Format [sale price effective date], "yyyy-mm-dd"))

    Can anyone help me put the finishing touches on this or tell me if I'm barking up the wrong tree with this approach?

    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Looks like circular reference, could be a problem. Try:
    sale price effective date: IIf([inventory]![SaleOn]=Yes, Format(Now(),"yyyy-mm-ddThh:nn:ssZ") & "/" & Format(Now()+10, "yyyy-mm-ddThh:nn:ssZ"), Null)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    monkeyman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2011
    Posts
    3
    Excellent, that worked like a charm, thanks!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Date Field empty if statement
    By dubsdj in forum Programming
    Replies: 4
    Last Post: 03-06-2011, 04:02 PM
  2. Replies: 1
    Last Post: 07-07-2010, 04:22 PM
  3. Set date field on subform to date variable
    By laavista in forum Access
    Replies: 4
    Last Post: 06-30-2010, 06:32 PM
  4. Replies: 1
    Last Post: 04-15-2010, 02:07 AM
  5. Replies: 1
    Last Post: 12-09-2005, 10:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums