Returns a long representation of the date in epoch time since January 1, 1970.
For compatibility with JDK 1.1.x, some three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them.
@script::formatDateValue(String dateString, String timeZone, String dateFormat)
(long) Epoch time since January 1, 1970.
The following example illustrates three methods of using formatDateValue:
@script::log("---FormatDateValue01---")
$dateString = "2008-07-29"
@script::log("DateString: " & $dateString)
$dateFormat = "yyyy-MM-dd"
@script::log("DateFormat: " & $dateFormat)
dateValue = @script::formatDateValue($dateString,"PST",$dateFormat)
@script::log("Date Value: " & $dateValue)
@script::log("-----------------------")
@script::log("---FormatDateValue02---")
$dateString = "2001.07.04 AD at 12:08:56 PST"
@script::log("DateString: " & $dateString)
$dateFormat = "yyyy.MM.dd G 'at' HH:mm:ss z"
@script::log("DateFormat: " & $dateFormat)
$dateValue = @script::formatDateValue($dateString,"PST",$dateFormat)
@script::log("Date Value: " & $dateValue)
@script::log("-----------------------")
@script::log("---FormatDateValue03---")
$dateString = "Wed, Jul 4, '01"
@script::log("DateString: " & $dateString)
$dateFormat = "EEE, MMM d, ''yy"
@script::log("DateFormat: " & $dateFormat)
$dateValue = @script::formatDateValue($dateString,"PST",$dateFormat)
@script::log("Date Value: " & $dateValue)
@script::log("-----------------------")
2008-05-26 16:16:38,963 [processBroker.9] INFO - ---FormatDateValue01---
2008-05-26 16:16:38,978 [processBroker.9] INFO - DateString: 2008-07-29
2008-05-26 16:16:38,978 [processBroker.9] INFO - DateFormat: yyyy-MM-dd
2008-05-26 16:16:38,978 [processBroker.9] INFO - Date Value: 1217314800000
2008-05-26 16:16:38,978 [processBroker.9] INFO - -----------------------
2008-05-26 16:16:38,978 [processBroker.9] INFO - ---FormatDateValue02---
2008-05-26 16:16:38,978 [processBroker.9] INFO - DateString: 2001.07.04
AD at 12:08:56 PST
2008-05-26 16:16:38,978 [processBroker.9] INFO - DateFormat: yyyy.MM.dd
G 'at' HH:mm:ss z
2008-05-26 16:16:38,978 [processBroker.9] INFO - Date Value: 994277336000
2008-05-26 16:16:38,978 [processBroker.9] INFO - -----------------------
2008-05-26 16:16:38,978 [processBroker.9] INFO - ---FormatDateValue03---
2008-05-26 16:16:38,978 [processBroker.9] INFO - DateString: Wed, Jul 4,
'01
2008-05-26 16:16:38,978 [processBroker.9] INFO - DateFormat: EEE, MMM d,
''yy
2008-05-26 16:16:38,978 [processBroker.9] INFO - Date Value: 994230000000
2008-05-26 16:16:38,978 [processBroker.9] INFO - -----------------------