[AccessD] Long Time Format difference A97, A2k, A2k3

Stuart McLachlan stuart at lexacorp.com.pg
Mon Aug 13 23:56:40 CDT 2007


Are you testing these on different machines? Sounds like the A97 is 
on one machine and the A2K, A2K3 are on a different one.

"Long Time"  etc formats are not specific to Access, they are 
determined by the Regional Settings in Windows.

On 13 Aug 2007 at 12:50, O'Connor, Patricia (OTDA) wrote:

> I am converting old A97 systems to A2k3. I have to go through A2k first.
> 
> There is a section in my code where I take a flat file with a date and
> time in separate columns, I convert both and then combine them. For the
> time conversion I have been using "LONG TIME" I works fine for almost 9
> years in A97.  When I test it in A2k I get error 13 type mismatch with
> the time conversion.  
> 
> I checked it through the immediate window and see that A2k adds an extra
> colon : at the end of the number.  I double checked the A97 and it comes
> out correctly.  So I also checked A2k3 and it also adds the extra colon
> :
> 
> If I use the "hh:nn:ss am/pm"  then it does not add the extra colon.  
> 
> Has anyone else run into this problem? Does anyone know why M$ changed
> how this works?
> 
> Thanks in advance 
> Patti
> 
> -------------------------------------------
> Access 2k
> 
> ?format(now(),"long Time")
> 12:50:35: PM
> ?format("14:57:44","long time")
> 02:57:44: PM
> ?format("10:57:44","long time")
> 10:57:44: AM
> ?format("11:57:44","hh:nn:ss am/pm")
> 11:57:44 am
> ?format("15:57:44","hh:nn:ss am/pm") 
> 03:57:44 pm
> --------------------------------------------
> Access 97
> 
> ?format(now(),"long Time")
> 12:49:54 PM
> ?format("15:57:44","long time")
> 03:57:44 PM
> ?format("11:57:44","long time")
> 11:57:44 AM
> ?format("11:57:44","hh:nn:ss am/pm")
> 11:57:44 am
> ?format("15:57:44","hh:nn:ss am/pm")
> 03:57:44 pm
> -----------------------------------------
> Access 2003
> 
> ?format(now(),"long Time")
> 12:49:16: PM
> ?format("11:57:44","long time")
> 11:57:44: AM
> ?format("15:57:44","long time")
> 03:57:44: PM
> ?format("15:57:44","hh:nn:ss am/pm")
> 03:57:44 pm
> ?format("11:57:44","hh:nn:ss am/pm")
> 11:57:44 am
> 
> 
> Thanks
> **************************************************
> * Patricia O'Connor
> * Associate Computer Programmer Analyst
> * OTDA - BDMA
> * (W) mailto:Patricia.O'Connor at otda.state.ny.us
> * (w) mailto:aa1160 at nysemail.state.ny.us
> ************************************************** 
> --------------------------------------------------------
> This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments.  Please notify the sender immediately by reply e-mail and delete the e-mail from your system.
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com





More information about the AccessD mailing list