Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there,
I am trying to combine a date and time field together into one:
Job_Date | Job_Time |
---|---|
01/01/2015 | 00:11:23 |
04/01/2014 | 23:45:21 |
16/01/2015 | 10:21:33 |
I tried using:
timestamp#(Job_Date & ' ' & Job_Time,'DD/MM/YYYY hh:mm:ss') to get both of them in one field but this function seems to convert the date into numbers and keeps the time format strangely.
Any idea how I can get around this please?
Sorry what I meant was:
If I use timestamp(Date) then it gives me something like 01/01/2015 00:00:00.
When I do timestamp(Date+Time) it then gives me blanks even though there are time values in the Time field.
This is my issue
There are some blanks in both the Date and Time fields.
Is in youre Time realy only a time value or is it only the shown format. Can you upload a qvw with the 2 fields?
Blanks can removed with replace or purgechar or with keepchar you can remove all but signs you expect.
Hi Jonas,
Here is the attached QVW file with the date and time!
Your Time field is not being loaded as a Time (fraction). I suggest reviewing these two blog posts before going much further. Mis-understanding QV Date/Times can send you down a rabbit hole.
Note that in my opinion, any recommendations that look like:
=Date(myTimeStamp)
=Time(myTimeStamp)
are generally incorrect and will take you into the aforementioned rabbit hole.
-Rob
Maybe your timefield is loaded as Text, not as dual (text with underlying numerical value).
You could check in the table viewer or using the expression
num(Job_Time)
hope this helps
regards
Marco
Hi Rob,
So what shall I do to the fields to fix the underlying issues? Do you have some practical guide sorry I am new to this
I have to do analysis on the dates and it's becoming complicated with these issues!
Hi Marco,
How can I load my data as dual?
Use the following in the load.
time(time#(Time,'hh:mm:ss')) as Time
If it appears in your Tablebox after load on the right side of the cells it's a time()