
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How create a datetime varaible from a date varaible and hours variable ?
Hi everybody,
How create a datetime varaible from a date variable and a hour variable ?
many thanks !
FC
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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')
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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')
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Many thanks Gysbert !
