Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 72601

Re: Converting number to date variable

$
0
0

Hi Liam, thanks for the thought but i've already read through this and unless i'm being dim ( not something I would rule out ), then neither the dateTime and timeSpan variables can be used to achieve this effect.


For instance if I was to take that 1000 hours ( just to keep in context of the previous example ) I could turn it into a timeSpan variable by dividing it up, giving me something like

1.11:00:00.0000000. which I could then add on so {% assign newDate =  startDate | plus: 1.11:00:00.0000000. %} this is essentially taking my start date and then adding 1 month and 11 days to it, which would take us from the 1st of October to indeed the 11th of November, however if we now pick a start date of the 22nd of February, the system will take that date and then attempt to add 1month and 11 days which is no longer a valid date. So this method only works if I can divide up my hours into a timeSpan variable based on a known start date however this is all in the context of a webApp and I would aim to have everything work dynamically.

 

What I really need is a way to apply a timeSpan variable that isn't in the context of months.days.hours.minuted but could look more like {% assign newDate =  startDate | plus: 43:00:00.0000000. %} but this isn't valid.

 

So I don't quite see how I can use this method, however if you feel i've missed the point and you could elaborate on how I could use these variable types better to achieve what i'd aiming to i'd really appreciate it.


Viewing all articles
Browse latest Browse all 72601

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>