It is important when dealing with date or time data that you use FileMaker's date and time functions instead of using text functions to parse out your results. Date and time functions will properly adjust regardless of your file or OS regional settings.
You will need to import that textDate into a text field. You can create a new timestamp field and set it at Auto-Enter tab to calculation of:
Let ( [
field = your text field ; // field with data formatted as 2011-12-31 10:51:36
d = Substitute ( LeftWords ( field ; 1 ) ; "-" ; ¶ ) ;
t = RightWords ( field ; 1 ) ;
mo = GetValue ( d ; 2 ) ;
da = GetValue ( d ; 3 ) ;
yr = GetValue ( d ; 1 )
Timestamp ( Date ( mo ; da ; yr ) ; GetAsTime ( t ) )
I had a duplicate line in the calc. I removed it.
Sorry for a late reply but Ive had a busy week at work.
Anyway a big thanks for giving me that coding it worked a treat. Ive looked at it a few times and dont fully understand how it works but never the less ive put it into my solution.