FIX: Ambiguous Date/Datetime Constant Error

Article translations Article translations
Article ID: 192768 - View products that this article applies to.
This article was previously published under Q192768
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page

Symptoms

Using an ambiguous date/datetime string in Visual FoxPro 6.0 causes an ambiguous date/datetime constant error message to occur. For example:
Use the following format:
{^yyyy-mm-dd[hh[:mm[:ss]][a|p]]}

Cause

The error message is missing a reference to an optional comma between the Date and Time string.

Resolution

To include the Hour and retain Minutes and Seconds the default in your datetime string, use one of the following formats:
   ?{^1998-12-12, 10} && This returns 12-12-98 10:00:00 AM
				
-or-

   ?{^1998-12-12 10:} && This returns 12-12-98 10:00:00 AM
				

Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual FoxPro 6.0 Service Pack 3. For additional information about Visual Studio service packs, click the following article numbers to view the articles in the Microsoft Knowledge Base:
194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That a Visual Studio Service Pack Is Installed
To download the latest Visual Studio service pack, visit the following Microsoft Web site:
http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx

More information

Steps to Reproduce Behavior

Type the following date/time string in the Command window:
      ?{^1998-12-12 10} && To display date and 10:00:00 AM
				
NOTE: According to the preceding date/datetime format, the format used is valid. However, Visual FoxPro still produces an error with the Ambiguous Date/Datetime error message dialog box.

Properties

Article ID: 192768 - Last Review: October 26, 2013 - Revision: 2.0
Applies to
  • Microsoft Visual FoxPro 6.0 Professional Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix kbxbase KB192768

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com