View Single Post
Old 10-04-2021, 03:40 AM   #170
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
You can use the following template:

Code:
program:
	ts = raw_field('timestamp');
	time_timezone = list_item(ts, 1, ' ');
	time = list_item(time_timezone, 0, '+');
	hours = list_item(time, 0, ':');
	minutes = list_item(time, 1, ':');
	seconds = list_item(time, 2, ':');
	strcat(hours, ':', minutes)
Search bar > settings icon > template tab > copy/paste the template above in the template cell, and in template value should be "00:00". Datatype should be "text".

Instead, you can do it by copy/pasting this directly into the search bar:

Code:
template:"program:
	ts = raw_field('timestamp');
	time_timezone = list_item(ts, 1, ' ');
	time = list_item(time_timezone, 0, '+');
	hours = list_item(time, 0, ':');
	minutes = list_item(time, 1, ':');
	seconds = list_item(time, 2, ':');
	strcat(hours, ':', minutes)#@#:t:00:00"
Edit: I tried the format_date() but for some reason it is not working:

Code:
template:"program:
	format_date($$timestamp, 'hh:mm')#@#:t:00:00"

Last edited by capink; 10-04-2021 at 03:47 AM.
capink is offline   Reply With Quote