Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
How create a datetime varaible from a date variable and a hour variable ?
many thanks !
FC
If your date is an actual date (meaning a number and not a string) and your hours are numbers too then date + hours/24 will result in a datetime (aka timestamp). If not you can try timestamp#(date & ' ' & hour, 'DD/MM/YYYY hh'). Change 'DD/MM/YYYY hh' to whatever matches the date format of your date.
vDate: 41080
vHour: 18
vDateTime: =$(vDate)+$(vTime)/24
vDate: '25/03/2013'
vHour: 18
vDateTime: =timestamp#(vDate & ' ' & vHour,'DD/MM/YYYY hh')
If your date is an actual date (meaning a number and not a string) and your hours are numbers too then date + hours/24 will result in a datetime (aka timestamp). If not you can try timestamp#(date & ' ' & hour, 'DD/MM/YYYY hh'). Change 'DD/MM/YYYY hh' to whatever matches the date format of your date.
vDate: 41080
vHour: 18
vDateTime: =$(vDate)+$(vTime)/24
vDate: '25/03/2013'
vHour: 18
vDateTime: =timestamp#(vDate & ' ' & vHour,'DD/MM/YYYY hh')
Many thanks Gysbert !