Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field called "Time_24" formated HH:MM:SS. When loadind in the script, I want to create a new field that only tracks HH:MM (I don't care about seconds). How do I make this happen in the load statement?
[Dim Time of Day]:
LOAD
"Time_Of_Day_Key"
"Time_24",
Hour ("Time_24") AS HOUR,
Minute("Time_24") AS MIN,
I want to add SOMETHING MAGIC FORUMLA AS HH:MM;
SQL SELECT *
FROM "Website_Usage_DW".dbo."Dim_Time_Of_Day";
Thanks!
Suzan
There are several options
time(Time_24,'hh:mm') as hh_mm will keep the numeric value of the time and also format it as hh:mm
hour(Time_24) & ':' & num(minute(Time_24),'00') as hh_mm will create a string value.
There are several options
time(Time_24,'hh:mm') as hh_mm will keep the numeric value of the time and also format it as hh:mm
hour(Time_24) & ':' & num(minute(Time_24),'00') as hh_mm will create a string value.