how to convert int field type to display hour format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2024 02:58 AM
how to convert int field type to display hour format
currently Iam using format_glide_duration which is showing Day-time format
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2024 03:18 AM - edited ‎02-03-2024 03:21 AM
Hi @Balakrishna_ABK ,
If above one not working Insted changing the field data type write script to change integer value to duration.
var catItem = current.cat_item.getRefRecord();
var durationSelected = parseInt(current.variables.estimated_duration);
if(current.variables.unit == 'Hours'){
var hourConversion = parseInt(durationSelected*60*60*1000);
catItem.durationField.setDateNumericValue(hourConversion);
catItem.update();
}
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2024 07:50 AM
Hi @Anand Kumar P @ can we do it by changing attribute?