Hi,
how can i convert a serial number of the date to date in formula?
There are a lot of function will return the serial number:
Datevalue
Date
Time
Timevalue
but if i want add (for example) two days to the current day and i want return the result on date field what can i do?
FromSerialNumberDateToDate(TODAY( )+2)
tnx in advance
JJ
Jisha Joy
Syncfusion Team
March 1, 2011 06:34 AM UTC
Hi,
You could use the following code do calculation on the datetime value. Here the 2 has been added to the today's day value.
=DATE(Year(Today()),Month(Today()),DAY(Today())+2)
Regards,
Jisha
AT
ABLE Tech srl
March 1, 2011 08:22 AM UTC
Hi,
the problem is that using the formula suggested by you can not take advantage of the automatic transmission of the month or year.
For example, if today was February 28, 2011 I would like to receive formula from March 2, 2011, or if it was December 31, 2010 I would get a return value equal to 2 January 2011.
The formula that inspired me back instead: "Year, Month, and Day parameters describe an un-representable DateTime."
What to do?
tnx
JJ
Jisha Joy
Syncfusion Team
March 10, 2011 09:45 AM UTC
HI Claudio,
In Calculate Dates are stored as sequential serial numbers so that they can be used in calculations. By default, January 1, 1900 is serial number 1 and November 12, 2002 is serial number 37572 because it is 37572 days after January 1, 1900.
You can use the DAY, Month, Year functions to get the correcsponding values from the sequential serial numbers.
=DAY(DATE(Year(Today()),Month(Today()),DAY(Today())+2)) //returns the day
=Month(DATE(Year(Today()),Month(Today()),DAY(Today())+2)) //month
=Year(DATE(Year(Today()),Month(Today()),DAY(Today())+2)) //year
Regards,
Jisha
AT
ABLE Tech srl
April 11, 2012 01:38 PM UTC
Hi, I have found this alternative formula:
TEXT(TODAY()+2,"dd/mm/yyyy")
Is it correct?
MC
Mercy C
Syncfusion Team
April 18, 2012 12:14 PM UTC
Hi Stefano,
Thanks for your update.
You can make use of "FromSerialNumberDateToDate(TODAY( )+2)" to convert serial number to date. Also, try with USEDateinCalc property to usedates in calculation.
Please let me know if you have any concerns.
Regards,
Mercy.C