Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have in the DB "Datetime" this is "dd.MM.YYYY mm.hh". Like this "12.08.2013 10:45". How can I load just the date "12.08.2013"?
This?
LoadedTable:
Load *,
Date(Floor(Date#(DATETIME, 'DD.MM.YYYY mm.hh.fff'))) As Date ;
ODBC CONNECT TO [xxx](xxx,xxx)
SQL SELECT Id,
action,
DATETIME
FROM XX."XX";
And if this too not working, try simply:
Date(Floor(DATETIME)) As Date
Hi
This should do it:
Date(Floor(Date#(DateTimeField, 'DD.MM.YYYY mm.hh'))) As Date
Hope that helps
Jonathan
Hi,
Can you try this:
= date(datefield,'DD.MM.YYYY')
Hi
Be careful. Date() does not discard the time values, it simply formats the date time field to not display the time part. Use Floor() to truncate the date time field to get rid of the time portion.
Regards
Jonathan
I saw its more than "12.08.2013 10:45". It's "12.08.2013 10:45:10.000000000"
like:
Select id,
name,
=date(datefield,'DD.MM.YYYY')
FROM table;
or how do I use the "="?
tRY THIS IN TEXT OBJECT
=SubField('12.08.2013 10:45.10000000000000',' ',1)
You 'll got the Date
or in script you can do this way
load
id,
name,
subfield(datefield,' ',1) as Date
FROM table;
I tried your expressions but i didnt get it working
Have you tried using floor() function, as suggested by Jonathan Dienst ? That should work fine. If all above not working, please share a sample file.
My Code:
ODBC CONNECT TO [xxx](xxx,xxx)
SQL SELECT Id,
action,
DATETIME //Sample: 12.08.2013 14:30:30.000000000
Date(Floor(Date#(DATETIME, 'DD.MM.YYYY mm.hh'))) As Date
FROM XX."XX";
Then I got an error.
Script Error.... Ausdruck fehlt
Scripr Error.... Expression wrong