Link to home
Start Free TrialLog in
Avatar of ca1358
ca1358

asked on

Format Number Long Integer Field

Table1 is Source Table and Field5 is Number Long Integer In Table1.
The First Query(Append)(Qry1_Update_6Chars) Formats Field5 find, if Field5 = 6 Characters:  
 ADD-TIME: CStr(Format(CDate(Left([Field5],2) & ":" & Mid([Field5],3,2)),"hh:nn AM/PM"))
---------------------------------------------------------------------------------------------------------------
My problem is Qry2_Update_5Chars which I tried append query:
ADD-TIME: IIf(Len([Field5])=5,CStr(Format(CDate(Left([Field5],1) & ":" & Mid([Field5],2,2)),"hh:nn AM/PM")))
If you just view it, it seems find but if try to Run to Append it, it doesn’t work.
Any suggestions would be appreciated!
---------------------------------------------------------------------------------------------------------------
Table2 now show QRy1_Update_6Chars  completed, If I can just get is Qry2_Update_5Chars to work.
Foramt.mdb
SOLUTION
Avatar of Flyster
Flyster
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ca1358
ca1358

ASKER

Qry2_Update_5chars does update the 5 Characters but wipes out 6 Characters in the Add_Time Field.

Dont understand why.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ca1358

ASKER

Thank you both for your help.  Sorry but I am not in control of the Extracts and I agree with you they should of format as Time data type.  I thank you again for helping learning more about Formatting.
You are welcome!

/gustav