ผู้สอบถาม
I need a field containing 00:00:00 as numeric (not text) in VFP to export dbf files to Sage 300 2020

คำถาม
-
I am creating a series of .csv files to import records in Sage 300 Payroll using low level file functions. There is one field called Valtime that requires 00:00:00 as a "number" not text with Quotes on each side. I either need to find out how to create a time field with the date portion or a low level function to strip the Quotes from around each of the records. If I create a field called Valtime T(8) the format is / / : : AM.12 สิงหาคม 2563 19:31
ตอบทั้งหมด
-
You mentioned VFP in the title, do you want to do this in Visual FoxPro? The MSDN forums for VFP have been archived (and not sure, most likely not, they were brought to Q&A).
Anyway, I did a quick search and found https://social.msdn.microsoft.com/Forums/en-US/9e7d5e2a-7bbb-436f-96d8-0947df7df6c6/converting-date-field-amp-character-time-field-to-a-datetime-field?forum=visualfoxprogeneral
although I don't like the very first solution (and the rest of the solutions I would not even consider).
If you still want to get support for VFP, then I personally use levelextreme.com forum (this is the place where VFP developers hang out), you can also get support in tek-tips forum (haven't looked at that in years).
BTW, did you simply try
CAST(timeColumn as DateTime) ? This may work, although I don't want to fire VFP to try it out myself.
Also, VFP has a concept of empty date and time while other database engines use NULL for the 'empty' date/time.
Looking for new opportunities
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles
- แก้ไขโดย Naomi N 12 สิงหาคม 2563 19:44
12 สิงหาคม 2563 19:40 -
Hi Steven Starace,
Your issue is related to VFP. I suggest you open a thread in VFP forums, People there will help you more effectively.
Besides,CAST and CONVERT (Transact-SQL) can convert an expression of one data type to another.
Hope this could help you.
Best Regards
Echo
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.13 สิงหาคม 2563 8:54 -
Echo,
The VFP forum in MSDN has been archived (no announcement was done prior to that). Can you please find out if it was brought to Q&A or just shut down completely?
Looking for new opportunities
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles13 สิงหาคม 2563 13:17 -
Hi Naomi,
Sorry, I did not see that the VFP forum has not been updated recently. I spent some time looking for a new VFP forum, but I didn’t find it. I also asked my colleagues for help. Unfortunately, I still couldn’t find it.
And I found that the VFP forum does not seem to have a Microsoft engineer to solve the problem, and I did not find the VFP forum in the Microsoft QA forum.
Best Regards
Echo
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.- แก้ไขโดย Echo Liuz 14 สิงหาคม 2563 8:50
14 สิงหาคม 2563 8:45 -
Hi Steven Starace,
Has your problem been solved? If it is solved, please mark the point that you
think is helpful as an answer. This can help others who encounter similar problems.
Best Regards
Echo
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.17 สิงหาคม 2563 5:59 -
SQL Server has TIME, DATE and DATETIME2(n) datatypes; would this help?
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking in Sets / Trees and Hierarchies in SQL
17 สิงหาคม 2563 18:20