Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have feild with date & time, like this " DD-MM-YYYY HH:MM:SS"
how can i separate to 2 feilds ,date alone and time alone ?
thanks'
yarin.
To remove the time and preserve as a date field, assuming your field is called InputDate, use:
Date(Floor(InputDate))
To get just the time, use:
Time(InputDate)
DateField=SubField(DateAndTimeField,' ')
TimeField=SubField(DateAndTimeField,' ',2)
You can format the fields as needed by the application.
hi,
can you please explain more,tha name of my feild is "start".
i don't know this function and the help (f1) doesn't help.
thanks'
yarin.
To remove the time and preserve as a date field, assuming your field is called InputDate, use:
Date(Floor(InputDate))
To get just the time, use:
Time(InputDate)
If the name of your field is 'start', and if you want date alone in a field named 'Date' and time alone in a field names 'Time', use the following expressions.
Date=SubField(start,' ')
Time=SubField(state,' ',2)
The function used is SubField() and the help states the following:
subfield(s, 'delimiter' [ , index ] )
In its three-parameter version, this script function returns a given substring from a larger string s with delimiter
'delimiter'. index is an optional integer denoting which of the substrings should be returned. ....