x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Difference between DateTime and Timespan?

I can do anything I need with DateTime, is Timespan some kind of a shortcut. I know it returns the same thing as Date. Anyone got an explanation?

Product Version: UE 4.18
Tags:
more ▼

asked Jan 16 '18 at 05:31 PM in Blueprint Scripting

avatar image

Kensei
84 18 23 22

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hey there, my guess is that DateTime is used to hold full dates and Timespan is used to hold a chunk of time. From a DateTime you can only add TimeSpans and not DateTimes. So i would say it's better to use Timespans if you want to add or subtract a chunk of time from a specific date using DateTime.

more ▼

answered Jan 16 '18 at 05:44 PM

avatar image

xlar8or
6k 161 129 304

avatar image Kensei Jan 16 '18 at 05:51 PM

I figured it out. Timespan can get you total things. For example if you have 30 days, you can get them in minutes, seconds etc. DateTime can do the same thing, but unlike DateTime, Timespan can convert time units pretty easily, going from minutets to years and vice versa. At least that's what I got from some testing.

Tx for the insight nonetheless.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

FDateTime stores a date and time, i.e. a point in time on a calendar and wall clock.

FTimespan stores a duration.

The difference between two FDateTime values is an FTimespan.

more ▼

answered Jan 17 '18 at 03:55 PM

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question