Alternative command to substring
Posted on 2011-03-10
I posted this question below last week and it worked on some fields but not others. I think he substring command only works on certain field types like varchar. The field Im trying to use the substring command on is smalldatetime data type and the substring command doesnt work, is there a similar command which can be used on the field so I can extract specific data out of the smalldatetime field?
Thanks in advance.
Hope someone can make sense of this. Apologies in advance, the developer has left and I have no idea how he would do this type of thing. We have an application which has a config file which is where we can define what tables are imported into our database. Within the config file, we must define the remote field and local field.
We have a field which stores date and time of applications made via our webstie. The remote field which stores this data is date qnd time in the following format.
Im just after the time part of the string.
In the config file, we already do some splitting of fields prior to importing. For example.
The above entry in the config file splits time at job into years/months. Its stored in one field on the remote table like this 22/2.
The only thing Im not clear on is the substring bit. My dateTime field has the format like this 2011-03-01 13:59:00, Im just after the time bit so what would the substring bit need to obtaining the time part of the string.
I tried this but it didn’t do anything.