Date conversion issue between Windev and SQL Server
Sylvie
-
meloyannick -
meloyannick -
I am currently migrating an application developed in Windev with a Hyper File database to a SQL Server database.
So far, the migration is going well. The creation of tables, connection to the new database, and data import are functioning.
My problem lies with the dates and times.
During the migration of tables to SQL Server, the date and time attributes are created with a datetime type of size 8. This type is in the format DD MMM YYYY HH:MM.
Under Windev, the date format is in the form YYYY MM DD.
To import the data, I first create a text file from Windev. Then I import this text file into SQL Server. During the import into SQL Server, the system does not recognize the format.
How can I convert it?
So far, the migration is going well. The creation of tables, connection to the new database, and data import are functioning.
My problem lies with the dates and times.
During the migration of tables to SQL Server, the date and time attributes are created with a datetime type of size 8. This type is in the format DD MMM YYYY HH:MM.
Under Windev, the date format is in the form YYYY MM DD.
To import the data, I first create a text file from Windev. Then I import this text file into SQL Server. During the import into SQL Server, the system does not recognize the format.
How can I convert it?
2 réponses
Hello Sylvie,
I just read your message about the conversion. I think you can solve this problem by first doing the conversion in Access instead of text. Then, you create a connection from Windev to the Access file obtained. To transfer to Windev, you do a sequential read of the Access file, transferring the first part of the DateTime field to a Date field in Windev and the second part of the DateTime to a Time field in the Windev table. It's a bit longer, but I think it's safer to keep all your information.
I hope this helps you. Otherwise, please let me know if you received a better response, or if you want we can write to each other about other issues.
Regards.
I just read your message about the conversion. I think you can solve this problem by first doing the conversion in Access instead of text. Then, you create a connection from Windev to the Access file obtained. To transfer to Windev, you do a sequential read of the Access file, transferring the first part of the DateTime field to a Date field in Windev and the second part of the DateTime to a Time field in the Windev table. It's a bit longer, but I think it's safer to keep all your information.
I hope this helps you. Otherwise, please let me know if you received a better response, or if you want we can write to each other about other issues.
Regards.