Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
igdrazil
Creator III
Creator III

Date from seconds to hour

Hi there, i have a date field that is like this: "DD.MM.YYYY - HH:mm:ss"

and it want to group my data to "DD.MM.YYYY - HH"

is it possible to do this in front end?

Regards

Chris

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try:

=Timestamp#(Subfield(Field,':',1), 'DD-MM-YYY - hh')

You might have to adjust the spaces in the format.

View solution in original post

5 Replies
tresesco
MVP
MVP

Timestamp(YourField, 'DD.MM.YYYY - HH')

igdrazil
Creator III
Creator III
Author

But then i will get lots of dates with hour 6 for example, but i need them to be grouped together so i will get 1 bar in barchart with all values for 30.11.2015 hour 6 and one bar for hour 7 and so on

tresesco
MVP
MVP

Try:

=Timestamp#(Subfield(Field,':',1), 'DD-MM-YYY - hh')

You might have to adjust the spaces in the format.

reddy-s
Master II
Master II

Hi Christoph,

This is how you can achieve it:

let vtime = date(date#('10/11/2015 09:31:12','DD/MM/YYYY h:mm:ss'),'DD/MM/YYYY h:mm:ss');

let vYourFormat = date(vtime,'DD/MM/YYYY') & ' - ' & hour(timestamp(vtime));

These expressions can be made use of both in the front end and in the script as well. But for performance purposes make use of this in the script.

igdrazil
Creator III
Creator III
Author

Thanks for all your posts! I'll try both of them at the moment i did it like this:

Date(Datefield) & ' - ' & Hour(Datefield)

Regards

Chris