How to convert this time string so I can subtract 5 hours from it...???
Posted on 2006-07-22
AuctionStartGMT = "2006-07-23T04:22:50.776Z"
AuctionStartDate = (Left(AuctionStartGMT,10))
AuctionStartDateSplit = Split(AuctionStartDate, "-")
AuctionStartMo = AuctionStartDateSplit(1)
AuctionStartDay = AuctionStartDateSplit(2)
AuctionStartYear = AuctionStartDateSplit(0)
AuctionStartDate = AuctionStartMo&"/"&AuctionStartDay&"/"&AuctionStartYear
AuctionStartTimeGMT = Mid(AuctionStartGMT,12,8)
AuctionStartTimestamp = AuctionStartDate&" "&AuctionStartTimeGMT
What I've got there works to the extent of turning the original time/date format returned into what I want: 07/23/2006 04:22:50
I need to subtract 5 hours from the time, though, because the time here is in GMT. When I try the following, I get an error:
AuctionStartTimeGMT - 5
Microsoft VBScript runtime (0x800A000D)
Type mismatch: '[string: "04:22:50"]'
How do I convert that text string into a time that I can then subtract from to convert this? Any information would be greatly appreciated. Thanks!