Hello Everyone,
I am trying to load data from a text file into a datetime field in a table in SQL Server. The text file contains values in the format yyyymmdd so I know I can use a Date String function in order to load them in the format yyyy-mm-dd. The problem is that I have some values in the text file that are 00000000. I'm using ActiveX to load "" in the datetime field when the value from the source file is 00000000, but how do I handle the case when it is also a regular date in the format 20041011. It's like I can use the Date String function to load the data as long as it's not 00000000, and I can load the data if it's only 00000000, but I can't handle when the data is both 00000000 and a regular date like 20041011. Can anyone help?
I am trying to load data from a text file into a datetime field in a table in SQL Server. The text file contains values in the format yyyymmdd so I know I can use a Date String function in order to load them in the format yyyy-mm-dd. The problem is that I have some values in the text file that are 00000000. I'm using ActiveX to load "" in the datetime field when the value from the source file is 00000000, but how do I handle the case when it is also a regular date in the format 20041011. It's like I can use the Date String function to load the data as long as it's not 00000000, and I can load the data if it's only 00000000, but I can't handle when the data is both 00000000 and a regular date like 20041011. Can anyone help?