From | Ata ur Rehman |
Date | Wed, 3 Jan 2007 15:10:36 +0500 |
Subject | [greenstone-users] Calculations in Format Statement and Date format |
I have a format string having the following code which displays the size of a file. But this size is in bytes and I want to display it in Kilo Bytes or Mega Bytes. How can i do that?
{if}{[FileSize],File Size: [FileSize] bytes} Means i want to display [FileSize] / 1024 for kilo bytes and [FileSize]/1024/1024 for Mega Bytes. Any idea. Similarly I have a meta field dc.Date having dates in format yyyymmdd and i want to display only years how can i format this date to extract only years from [
dc.Date] ?
Regards,
Ata ur Rehman, Librarian, Akhter Hameed Khan Resource Center (AHKRC), NRSP-Institute of Rural Management, F-6/4, Islamabad Ph: +92 51 2822752 +92 51 2822792 http://www.irm.edu.pk/ |