## Script (Python) "streng_til_dato"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=streng
##title=
##
from string import split
from string import strip
from DateTime import DateTime

if not same_type(streng, ''):
  raise AssertionError, streng

streng = strip(streng)
liste = split(streng, '.')
if len(liste) == 3:
  try:
    dato = DateTime(liste[2] + '/' + liste[1] + '/' + liste[0] + ' 23:59:59.00')
  except:
    dato = DateTime('1900/01/01')
else:
  dato = DateTime('1900/01/01')

return dato
